mirror of
https://github.com/OpenDiablo2/OpenDiablo2
synced 2025-02-03 07:07:25 -05:00
golang lint reformatting applied
This commit is contained in:
parent
a900c6245d
commit
05c8b5b294
@ -4,7 +4,6 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
func TestCacheInsert(t *testing.T) {
|
func TestCacheInsert(t *testing.T) {
|
||||||
cache := CreateCache(1)
|
cache := CreateCache(1)
|
||||||
insertError := cache.Insert("A", "", 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) {
|
func TestCacheInsertUpdatesWeight(t *testing.T) {
|
||||||
cache := CreateCache(2)
|
cache := CreateCache(2)
|
||||||
cache.Insert("A", "", 1)
|
cache.Insert("A", "", 1)
|
||||||
@ -80,4 +88,3 @@ func TestClear(t *testing.T) {
|
|||||||
t.Fatal("Still able to retrieve nodes after cache was cleared")
|
t.Fatal("Still able to retrieve nodes after cache was cleared")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user