Beispiel #1
0
func TestInt64SliceDelete(t *testing.T) {
	is := util.Int64Slice{-29, 30, -1}
	assert.NoError(t, is.Delete(1))
	assert.EqualValues(t, []int64{-29, -1}, is.ToInt64())
	assert.EqualError(t, util.ErrOutOfRange, is.Delete(100).Error())
}
Beispiel #2
0
func TestInt64SliceAppend(t *testing.T) {
	is := util.Int64Slice{30, -1}
	is.Append(6)
	assert.EqualValues(t, []int64{30, -1, 6}, is.ToInt64())
}