at operator return -1 when fails in lists and arrays; insert operators (<< and >>) changes che container if it is a variable
This commit is contained in:
+2
-2
@@ -38,10 +38,10 @@ func TestLinkedInsert(t *testing.T) {
|
||||
section := "LinkedList-Insert"
|
||||
inputs := []inputType{
|
||||
/* 1 */ {`[<>] << 1`, list.NewLinkedListA(1), nil},
|
||||
/* 2 */ {`[<>] << [1,2]`, list.NewLinkedListA(array.NewArrayA(int64(1), int64(2))), nil},
|
||||
/* 2 */ {`[<>] << [1,2]`, list.NewLinkedListA(array.ArrayFromIntsA(1, 2)), nil},
|
||||
/* 3 */ {`[<>] << [<1,2>]`, list.NewLinkedListA(list.NewLinkedListA(1, 2)), nil},
|
||||
/* 4 */ {`1 >> [<>]`, list.NewLinkedListA(1), nil},
|
||||
/* 5 */ {`[1,2] >> [<>]`, list.NewLinkedListA(array.NewArrayA(int64(1), int64(2))), nil},
|
||||
/* 5 */ {`[1,2] >> [<>]`, list.NewLinkedListA(array.ArrayFromIntsA(1, 2)), nil},
|
||||
/* 6 */ {`[<1,2>] >> [<>]`, list.NewLinkedListA(list.NewLinkedListA(1, 2)), nil},
|
||||
/* 7 */ {`$([1,2]) >> [<>]`, list.NewLinkedListA(1, 2), nil},
|
||||
/* 8 */ {`$([<1,2>]) >> [<>]`, list.NewLinkedListA(1, 2), nil},
|
||||
|
||||
Reference in New Issue
Block a user