From d078f6dc10eb265a5d88cd96adf86173d6d3ba2e Mon Sep 17 00:00:00 2001 From: Flu0r1ne Date: Thu, 2 Sep 2021 03:14:47 -0500 Subject: Make adapters and internals complient with new directory structure --- testcase.go | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'testcase.go') 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 -- cgit v1.2.3