Skip to content

Commit 4235fff

Browse files
committed
Add test for Int64sToMap()
1 parent d417aed commit 4235fff

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

modules/base/tool_test.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,14 @@ func TestInt64sToStrings(t *testing.T) {
153153
)
154154
}
155155

156-
// TODO: Int64sToMap()
156+
func TestInt64sToMap(t *testing.T) {
157+
assert.Equal(t, map[int64]bool{}, Int64sToMap([]int64{}))
158+
assert.Equal(t,
159+
map[int64]bool{1: true, 4: true, 16: true},
160+
Int64sToMap([]int64{1, 4, 16}),
161+
)
162+
}
163+
157164
// TODO: IsLetter()
158165
// TODO: IsTextFile()
159166
// TODO: IsImageFile()

0 commit comments

Comments
 (0)