From 875e8b54c907c60682567a6f900cbf99bedf55c5 Mon Sep 17 00:00:00 2001 From: rc_05 Date: Tue, 14 May 2024 01:07:07 +0200 Subject: First commit. --- src/tester/Test.hx | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 src/tester/Test.hx (limited to 'src/tester/Test.hx') 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; + } +} -- cgit v1.2.3