diff options
| author | Furkan Sahin <furkan-dev@proton.me> | 2021-09-02 03:14:47 -0500 |
|---|---|---|
| committer | Furkan Sahin <furkan-dev@proton.me> | 2021-09-02 03:14:47 -0500 |
| commit | 2af7117891cdb67758219a7075f39c05dc02f3f5 (patch) | |
| tree | 3d19e0fb7398670db419922414145515b4d5e026 /testcase.go | |
| parent | ac43c7f2d44d5f815d16a01d1171835538b4f532 (diff) | |
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 |
