File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ func TestRemove(t *testing.T) {
7474}
7575
7676func TestAdd (t * testing.T ) {
77- lru_cache := New (3 )
77+ lru := New (3 )
7878 items := []struct {
7979 key string
8080 value string
@@ -86,10 +86,10 @@ func TestAdd(t *testing.T) {
8686 {"four" , "4" },
8787 }
8888 for _ , tt := range items {
89- lru_cache .Add (tt .key , tt .value )
89+ lru .Add (tt .key , tt .value )
9090 }
91- if lru_cache .ll .Len () != 3 {
92- t .Fatalf ("Expected 3 items; got %d items" , lru_cache .ll .Len ())
91+ if lru .ll .Len () != 3 {
92+ t .Fatalf ("lru size: %d items; expected 3 items" , lru .ll .Len ())
9393 }
9494}
9595
@@ -101,6 +101,6 @@ func TestAddToNilCache(t *testing.T) {
101101 }
102102 c .Add ("foo" , "bar" )
103103 if c .ll .Len () != 1 {
104- t .Fatalf ("Expected 1 item; got %d items" , c .ll .Len ())
104+ t .Fatalf ("lru size: %d items; expected 1 item " , c .ll .Len ())
105105 }
106106}
You can’t perform that action at this time.
0 commit comments