mirror of
https://github.com/bettercap/bettercap
synced 2025-08-20 13:33:21 -07:00
add test for Empty function
This commit is contained in:
parent
db7c2d0a74
commit
7a6cf8f197
1 changed files with 15 additions and 0 deletions
|
@ -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")
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue