diff options
| author | Furkan Sahin <furkan-dev@proton.me> | 2021-08-05 18:41:53 -0500 |
|---|---|---|
| committer | Furkan Sahin <furkan-dev@proton.me> | 2021-08-05 18:41:53 -0500 |
| commit | 5d8cd855ed3d1f12bee941ede9a9098248d27b69 (patch) | |
| tree | 1ac1928e932a7f40c4a27ecd5a11f3dc4e1dc9fe /config.go | |
| parent | bf37ad9dafe5af6c08f66b29331bd92f1a812673 (diff) | |
Improvised a basic text report, finished evaluation mappings
Diffstat (limited to 'config.go')
| -rw-r--r-- | config.go | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -60,6 +60,7 @@ type AdapterConfig struct { // in defaults.toml type Defaults struct { Points *float32 + Adapter *string /* The TOML library only parses exported fields. @@ -89,6 +90,12 @@ type TestCaseConfig struct { Description *string } +func (c TestCaseConfig) ensureSatisfied(name string) { + if (c.Adapter == nil) { + log.Fatalf("Adapter must be provided for testcase %s", name) + } +} + // The default configuration must be able in inherit from // other defaults further up the tree // @@ -101,6 +108,10 @@ func (child *Defaults) Inherit(p interface{}) { child.Points = parent.Points; } + if child.Adapter == nil { + child.Adapter = parent.Adapter; + } + // Call the inherit method as defined by the adapters // If an adapter is undefined, inherit the parent configuration // |
