aboutsummaryrefslogtreecommitdiff
path: root/src/tester/Test.hx
blob: b1e8d03e073946e695513ae6c4af8b51ac5d173a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package tester;

enum Outcome {
    Pass;
    Fail(reason:String);
}

/**
    Class for creating a test case.

    Each test case *must* extend this class and override the `run` function.
**/
class Test {
    public var description(default, null):String;

    /**
        Creates a new test case with a `description` that identifies and/or describes
        what test is it.
    **/
    public function new(description:String) {
        this.description = description;
    }

    /**
        Runs the test and returns it's outcome.
    **/
    public function run():Outcome {
        return null;
    }
}