aboutsummaryrefslogtreecommitdiffstats
path: root/modules/base/tool_test.go
diff options
context:
space:
mode:
authorMatthias Loibl <mail@matthiasloibl.com>2016-11-07 22:08:50 +0100
committerMatthias Loibl <mail@matthiasloibl.com>2016-11-07 23:31:40 +0100
commit4235fff9eee14e91d0587b03fac64980047660bf (patch)
treeca41d4b70143b561a1001d882962e455145c283a /modules/base/tool_test.go
parentd417aedcfac506674a5690c360e746ad17b366a6 (diff)
downloadgitea-4235fff9eee14e91d0587b03fac64980047660bf.tar.gz
gitea-4235fff9eee14e91d0587b03fac64980047660bf.zip
Add test for Int64sToMap()
Diffstat (limited to 'modules/base/tool_test.go')
-rw-r--r--modules/base/tool_test.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/modules/base/tool_test.go b/modules/base/tool_test.go
index bca9954194..052a2f0dec 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()