func TestInt64SliceReduce(t *testing.T) { af := func(i int64) bool { return (i & 1) == 1 } l := util.Int64Slice{2, 4, 30, 22} assert.EqualValues(t, []int64{}, l.Reduce(af).ToInt64()) l.Append(3, 5) assert.EqualValues(t, []int64{3, 5}, l.Reduce(af).ToInt64()) }