aboutsummaryrefslogblamecommitdiff
path: root/src/tester/Test.hx
blob: b1e8d03e073946e695513ae6c4af8b51ac5d173a (plain) (tree)





























                                                                                     
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;
    }
}