tpl/collections: Fix where ... not in with empty slice

Fixes #13621
This commit is contained in:
Bjørn Erik Pedersen
2025-04-21 11:53:38 +02:00
parent 5e62cc6fce
commit 4eb0e4286a
3 changed files with 24 additions and 0 deletions

View File

@@ -761,6 +761,7 @@ func TestCheckCondition(t *testing.T) {
expect{true, false},
},
{reflect.ValueOf(123), reflect.ValueOf([]int{45, 678}), "not in", expect{true, false}},
{reflect.ValueOf(123), reflect.ValueOf([]int{}), "not in", expect{true, false}},
{reflect.ValueOf("foo"), reflect.ValueOf([]string{"bar", "baz"}), "not in", expect{true, false}},
{
reflect.ValueOf(time.Date(2015, time.May, 26, 19, 18, 56, 12345, time.UTC)),