golang lint reformatting applied

This commit is contained in:
anvil-of-fury 2021-03-21 02:27:58 +00:00
parent a900c6245d
commit 05c8b5b294
1 changed files with 9 additions and 2 deletions

View File

@ -4,7 +4,6 @@ import (
"testing"
)
func TestCacheInsert(t *testing.T) {
cache := CreateCache(1)
insertError := cache.Insert("A", "", 1)
@ -13,6 +12,15 @@ func TestCacheInsert(t *testing.T) {
}
}
// TODO: do we want cache insert to fail if we add a node with weight > budget?
func TestCacheInsertWithinBudget(t *testing.T) {
cache := CreateCache(1)
insertError := cache.Insert("A", "", 2)
if insertError == nil {
t.Fatalf("Cache insert of node weight larger than budget did not result in error")
}
}
func TestCacheInsertUpdatesWeight(t *testing.T) {
cache := CreateCache(2)
cache.Insert("A", "", 1)
@ -80,4 +88,3 @@ func TestClear(t *testing.T) {
t.Fatal("Still able to retrieve nodes after cache was cleared")
}
}