diff options
author | Flu0r1ne <flur01ne@flu0r1ne.net> | 2021-09-02 03:14:47 -0500 |
---|---|---|
committer | Flu0r1ne <flur01ne@flu0r1ne.net> | 2021-09-02 03:14:47 -0500 |
commit | d078f6dc10eb265a5d88cd96adf86173d6d3ba2e (patch) | |
tree | ed8bc2405b60b2ae31405c3d8e27b24fda3ac003 /testcase.go | |
parent | 96701f87a114557f1a013229e889b4b726aa7dc1 (diff) | |
download | planr-d078f6dc10eb265a5d88cd96adf86173d6d3ba2e.tar.xz planr-d078f6dc10eb265a5d88cd96adf86173d6d3ba2e.zip |
Make adapters and internals complient with new directory structure
Diffstat (limited to 'testcase.go')
-rw-r--r-- | testcase.go | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/testcase.go b/testcase.go index 8506b84..7e0bf17 100644 --- a/testcase.go +++ b/testcase.go @@ -1,9 +1,13 @@ package planr +import ( + "log" +) + type TestStatus uint const ( - PASSING TestStatus = iota + PASSING TestStatus = iota COMPILATION_FAILURE RUNTIME_FAILURE ) @@ -15,6 +19,19 @@ type TestResult struct { TestOutput string } +// Program-wide testcase config +type TestCaseConfig struct { + Defaults + Title *string + Description *string +} + +func (c TestCaseConfig) ensureSatisfied(name string) { + if (c.Adapter == nil) { + log.Fatalf("Adapter must be provided for testcase %s", name) + } +} + type TestCase struct { // absolute path to the test case configuration Path string |