summaryrefslogtreecommitdiffstats
path: root/tpl/collections/collections_test.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2017-07-03 10:08:55 +0200
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2017-07-03 10:23:03 +0200
commitd12cf5a25df00fa16c59f0b2ae282187a398214c (patch)
tree25b08bb142a8df6219b52263fed7ec52f46504d8 /tpl/collections/collections_test.go
parente10e51a00827b9fdc1bee51439fef05afc529831 (diff)
tpl/collections: Fix In function for JSON arrays
Fixes #1468
Diffstat (limited to 'tpl/collections/collections_test.go')
-rw-r--r--tpl/collections/collections_test.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/tpl/collections/collections_test.go b/tpl/collections/collections_test.go
index 64c358ddd..ea23a1de7 100644
--- a/tpl/collections/collections_test.go
+++ b/tpl/collections/collections_test.go
@@ -244,10 +244,13 @@ func TestIn(t *testing.T) {
{[]int{1, 2, 4}, 3, false},
{[]float64{1.23, 2.45, 4.67}, 1.23, true},
{[]float64{1.234567, 2.45, 4.67}, 1.234568, false},
+ {[]float64{1, 2, 3}, 1, true},
+ {[]float32{1, 2, 3}, 1, true},
{"this substring should be found", "substring", true},
{"this substring should not be found", "subseastring", false},
{nil, "foo", false},
} {
+
errMsg := fmt.Sprintf("[%d] %v", i, test)
result := ns.In(test.l1, test.l2)