diff options
author | rc_05 <contact@rc-05.com> | 2024-05-14 01:07:07 +0200 |
---|---|---|
committer | rc_05 <contact@rc-05.com> | 2024-05-14 01:18:42 +0200 |
commit | 875e8b54c907c60682567a6f900cbf99bedf55c5 (patch) | |
tree | 44dc606fa92217781cb33393810b778ebd76cf36 /src/tester/Test.hx | |
download | haxe-tester-875e8b54c907c60682567a6f900cbf99bedf55c5.tar.gz |
First commit.
Diffstat (limited to 'src/tester/Test.hx')
-rw-r--r-- | src/tester/Test.hx | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/tester/Test.hx b/src/tester/Test.hx new file mode 100644 index 0000000..b1e8d03 --- /dev/null +++ b/src/tester/Test.hx @@ -0,0 +1,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; + } +} |