Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(221)

Unified Diff: go/util/caching_test.go

Issue 1401563003: Enable clear/purge for failed digests (Closed) Base URL: https://skia.googlesource.com/buildbot@master
Patch Set: Added unit test to FileDiffStore Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « go/util/caching.go ('k') | go/util/testing.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: go/util/caching_test.go
diff --git a/go/util/caching_test.go b/go/util/caching_test.go
index f5cdb7b46b4f385ace1ee8864cb197a67b4f019a..456ab08ce72d82f936492a1c8dc9e2429a9cfced 100644
--- a/go/util/caching_test.go
+++ b/go/util/caching_test.go
@@ -7,11 +7,6 @@ import (
)
func TestJSONCodec(t *testing.T) {
- type myTestType struct {
- A int
- B string
- }
-
itemCodec := JSONCodec(&myTestType{})
testInstance := &myTestType{5, "hello"}
jsonBytes, err := itemCodec.Encode(testInstance)
@@ -32,3 +27,8 @@ func TestJSONCodec(t *testing.T) {
assert.IsType(t, []*myTestType{}, decodedArr)
assert.Equal(t, testArr, decodedArr)
}
+
+func TestMemLRUCache(t *testing.T) {
+ cache := NewMemLRUCache(0)
+ UnitTestLRUCache(t, cache)
+}
« no previous file with comments | « go/util/caching.go ('k') | go/util/testing.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698