Skip to content

Commit

Permalink
Merge pull request #4 from Senpos:fix-duplicated-tests
Browse files Browse the repository at this point in the history
add MaxKeySize option test, remove duplicated MaxCacheSize option test
  • Loading branch information
umputun committed Oct 13, 2019
2 parents 1bf0f67 + 4ed8e74 commit 51598f3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions expirable_cache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ func TestExpirableCache_BadOptions(t *testing.T) {
_, err := NewExpirableCache(MaxCacheSize(-1))
assert.EqualError(t, err, "failed to set cache option: negative max cache size")

_, err = NewExpirableCache(MaxCacheSize(-1))
assert.EqualError(t, err, "failed to set cache option: negative max cache size")
_, err = NewExpirableCache(MaxKeySize(-1))
assert.EqualError(t, err, "failed to set cache option: negative max key size")

_, err = NewExpirableCache(MaxKeys(-1))
assert.EqualError(t, err, "failed to set cache option: negative max keys")
Expand Down
4 changes: 2 additions & 2 deletions lru_cache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ func TestLruCache_BadOptions(t *testing.T) {
_, err := NewLruCache(MaxCacheSize(-1))
assert.EqualError(t, err, "failed to set cache option: negative max cache size")

_, err = NewLruCache(MaxCacheSize(-1))
assert.EqualError(t, err, "failed to set cache option: negative max cache size")
_, err = NewLruCache(MaxKeySize(-1))
assert.EqualError(t, err, "failed to set cache option: negative max key size")

_, err = NewLruCache(MaxKeys(-1))
assert.EqualError(t, err, "failed to set cache option: negative max keys")
Expand Down

0 comments on commit 51598f3

Please sign in to comment.