From eb8269b44c8cc887b85da9cbefb7b0e8af2fefaf Mon Sep 17 00:00:00 2001 From: siddontang Date: Thu, 17 Apr 2014 08:53:21 +0800 Subject: [PATCH] update list --- list/list.go | 2 +- list/list_test.go | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) 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 {