File tree 1 file changed +5
-5
lines changed
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) {
74
74
}
75
75
76
76
func TestAdd (t * testing.T ) {
77
- lru_cache := New (3 )
77
+ lru := New (3 )
78
78
items := []struct {
79
79
key string
80
80
value string
@@ -86,10 +86,10 @@ func TestAdd(t *testing.T) {
86
86
{"four" , "4" },
87
87
}
88
88
for _ , tt := range items {
89
- lru_cache .Add (tt .key , tt .value )
89
+ lru .Add (tt .key , tt .value )
90
90
}
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 ())
93
93
}
94
94
}
95
95
@@ -101,6 +101,6 @@ func TestAddToNilCache(t *testing.T) {
101
101
}
102
102
c .Add ("foo" , "bar" )
103
103
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 ())
105
105
}
106
106
}
You can’t perform that action at this time.
0 commit comments