add test for Empty function

This commit is contained in:
Kent Gruber 2018-05-02 13:20:38 -04:00
commit 7a6cf8f197

View file

@ -85,3 +85,18 @@ func TestMetaEach(t *testing.T) {
t.Fatalf("expected '%v', got '%v'", exp, got)
}
}
func TestMetaEmpty(t *testing.T) {
example := buildExampleMeta()
if !example.Empty() {
t.Error("unable to check if filled struct is empty")
}
example.m["picat"] = true //fill struct so not empty
if example.Empty() {
t.Error("unable to check if filled struct is empty")
}
}