diff --git a/go/seatdef/seatdef_test.go b/go/seatdef/seatdef_test.go index fccd43b..43881f4 100644 --- a/go/seatdef/seatdef_test.go +++ b/go/seatdef/seatdef_test.go @@ -4,8 +4,6 @@ import ( "errors" "strings" "testing" - - "git.novox.be/novox/mesh-sdk/go/catalogue" ) // TestADefinitionIsReadStrictlyNamingWhatIsWrong is the format's own table (design 26: a valid definition parses; @@ -149,13 +147,3 @@ func withState(def, state string) string { } return strings.Replace(def, `"decision":"ADR 1",`, `"decision":"ADR 1","states":[`+state+`],`, 1) } - -// TestTheTemplatesAreTheCataloguesSix holds this reader's list of templates equal to the one a module's `requires` -// entry takes (ADR 0595 §2), so a seventh template cannot be added to one and not the other. -func TestTheTemplatesAreTheCataloguesSix(t *testing.T) { - want := []string{catalogue.TemplateState, catalogue.TemplateEvents, catalogue.TemplateWorkQueue, - catalogue.TemplateLog, catalogue.TemplateObjects, catalogue.TemplateLedger} - if strings.Join(Templates, ",") != strings.Join(want, ",") { - t.Errorf("templates %v, the catalogue's %v", Templates, want) - } -} diff --git a/go/seatdef/templates_test.go b/go/seatdef/templates_test.go new file mode 100644 index 0000000..88bac53 --- /dev/null +++ b/go/seatdef/templates_test.go @@ -0,0 +1,20 @@ +package seatdef_test + +import ( + "strings" + "testing" + + "git.novox.be/novox/mesh-sdk/go/catalogue" + "git.novox.be/novox/mesh-sdk/go/seatdef" +) + +// (An external test: the catalogue reads definitions, so seatdef's own tests cannot import it.) +// TestTheTemplatesAreTheCataloguesSix holds this reader's list of templates equal to the one a module's `requires` +// entry takes (ADR 0595 §2), so a seventh template cannot be added to one and not the other. +func TestTheTemplatesAreTheCataloguesSix(t *testing.T) { + want := []string{catalogue.TemplateState, catalogue.TemplateEvents, catalogue.TemplateWorkQueue, + catalogue.TemplateLog, catalogue.TemplateObjects, catalogue.TemplateLedger} + if strings.Join(seatdef.Templates, ",") != strings.Join(want, ",") { + t.Errorf("templates %v, the catalogue's %v", seatdef.Templates, want) + } +}