diff --git a/list/list.go b/list/list.go index e38830a..78dac7d 100644 --- a/list/list.go +++ b/list/list.go @@ -1,4 +1,4 @@ -package arraylist +package list const defaultSize = 1024 diff --git a/list/list_test.go b/list/list_test.go index 598fc58..a86c87b 100644 --- a/list/list_test.go +++ b/list/list_test.go @@ -1,4 +1,4 @@ -package arraylist +package list import ( "reflect" @@ -258,6 +258,8 @@ func TestIssue6349(t *testing.T) { l.PushBack(2) e := l.Front() + + //because element may be reused later, we must clear value in Remove v := l.Remove(e) if v != 1 {