aboutsummaryrefslogtreecommitdiff
path: root/testcase.go
diff options
context:
space:
mode:
Diffstat (limited to 'testcase.go')
-rw-r--r--testcase.go19
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