From 4235fff9eee14e91d0587b03fac64980047660bf Mon Sep 17 00:00:00 2001 From: Matthias Loibl Date: Mon, 7 Nov 2016 22:08:50 +0100 Subject: [PATCH] Add test for Int64sToMap() --- modules/base/tool_test.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/modules/base/tool_test.go b/modules/base/tool_test.go index bca995419..052a2f0de 100644 --- a/modules/base/tool_test.go +++ b/modules/base/tool_test.go @@ -153,7 +153,14 @@ func TestInt64sToStrings(t *testing.T) { ) } -// TODO: Int64sToMap() +func TestInt64sToMap(t *testing.T) { + assert.Equal(t, map[int64]bool{}, Int64sToMap([]int64{})) + assert.Equal(t, + map[int64]bool{1: true, 4: true, 16: true}, + Int64sToMap([]int64{1, 4, 16}), + ) +} + // TODO: IsLetter() // TODO: IsTextFile() // TODO: IsImageFile()