mirror of
https://github.com/bettercap/bettercap
synced 2025-08-21 05:53:20 -07:00
add test for GetIntsWith function with documented TODO
I didn’t really understand this function entirely.
This commit is contained in:
parent
e4352e8a98
commit
b8a0b86282
1 changed files with 14 additions and 0 deletions
|
@ -31,3 +31,17 @@ func TestMetaSet(t *testing.T) {
|
|||
t.Error("unable to set meta data in struct")
|
||||
}
|
||||
}
|
||||
|
||||
// TODO document what this does, not too clear,
|
||||
// at least for me today lolololol
|
||||
func TestMetaGetIntsWith(t *testing.T) {
|
||||
example := buildExampleMeta()
|
||||
example.m["picat"] = "3,"
|
||||
|
||||
exp := []int{4, 3}
|
||||
got := example.GetIntsWith("picat", 4, false)
|
||||
|
||||
if exp[0] != got[0] {
|
||||
t.Fatalf("expected '%v', got '%v'", exp, got)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue