From b366a3dbac5507e4a36d5820ead487ca62aafa4a Mon Sep 17 00:00:00 2001 From: vhpl-uis Date: Thu, 31 Aug 2023 11:11:46 +0200 Subject: [PATCH] fixed go package --- go.mod | 2 ++ go.sum | 3 +++ model/parts/types/cache_struct_test.go | 9 ++++----- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/go.mod b/go.mod index 719abe2..2e257be 100644 --- a/go.mod +++ b/go.mod @@ -4,6 +4,7 @@ go 1.19 require ( github.com/seehuhn/mt19937 v1.0.0 + github.com/zavitax/sortedset-go v1.1.1 gonum.org/v1/gonum v0.13.0 gonum.org/v1/plot v0.13.0 gopkg.in/yaml.v3 v3.0.1 @@ -19,6 +20,7 @@ require ( github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 // indirect github.com/google/go-cmp v0.5.9 // indirect github.com/pkg/errors v0.9.1 // indirect + golang.org/x/exp v0.0.0-20230510235704-dd950f8aeaea // indirect golang.org/x/image v0.7.0 // indirect golang.org/x/text v0.9.0 // indirect ) diff --git a/go.sum b/go.sum index cf149a5..7851bd5 100644 --- a/go.sum +++ b/go.sum @@ -25,11 +25,14 @@ github.com/seehuhn/mt19937 v1.0.0 h1:r02DuVkQXfohssWZO8L/TeAlYOah7aNNubEHB/7Vtfs github.com/seehuhn/mt19937 v1.0.0/go.mod h1:RikyXajNu+1Gqxm4hOacc3ckyWRd0usF6IkE3gnEcAM= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +github.com/zavitax/sortedset-go v1.1.1 h1:m5XN5zOZzJ1HlAW5n1CRg80qWBgB8sFlbIJqA5H9NXU= +github.com/zavitax/sortedset-go v1.1.1/go.mod h1:rbneDZHWKxoO1RVXIo4y5x6E/blXQJtCSNMOuhLEsQI= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/exp v0.0.0-20230510235704-dd950f8aeaea h1:vLCWI/yYrdEHyN2JzIzPO3aaQJHQdp89IZBA/+azVC4= +golang.org/x/exp v0.0.0-20230510235704-dd950f8aeaea/go.mod h1:V1LtkGg67GoY2N1AnLN78QLrzxkLyJw7RJb1gzOOz9w= golang.org/x/image v0.7.0 h1:gzS29xtG1J5ybQlv0PuyfE3nmc6R4qB73m6LUUmvFuw= golang.org/x/image v0.7.0/go.mod h1:nd/q4ef1AKKYl/4kft7g+6UyGbdiqWqTP1ZAbRoV7Rg= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= diff --git a/model/parts/types/cache_struct_test.go b/model/parts/types/cache_struct_test.go index 22fdcdf..a4b218b 100644 --- a/model/parts/types/cache_struct_test.go +++ b/model/parts/types/cache_struct_test.go @@ -31,7 +31,7 @@ func TestAddToCache_Unlimited(t *testing.T) { } func TestAddToCache_Proximity(t *testing.T) { - config.InitConfigWithPath(path) + config.InitConfig() config.SetCacheModel(1) cache := CacheStruct{ @@ -63,7 +63,7 @@ func TestAddToCache_Proximity(t *testing.T) { } func TestAddToCache_LeastRecentUsed(t *testing.T) { - config.InitConfigWithPath(path) + config.InitConfig() config.SetCacheModel(2) cache := CacheStruct{ @@ -97,7 +97,7 @@ func TestAddToCache_LeastRecentUsed(t *testing.T) { } func TestAddToCache_LeastFrequentlyUsed(t *testing.T) { - config.InitConfigWithPath(path) + config.InitConfig() config.SetCacheModel(3) cache := CacheStruct{ @@ -124,7 +124,6 @@ func TestAddToCache_LeastFrequentlyUsed(t *testing.T) { t.Errorf("Expected ChunkId 2 to be removed") } - if _, exists := cache.CacheMap[ChunkId(1)]; !exists { t.Errorf("Expected ChunkId 1 to be added") } @@ -137,7 +136,7 @@ func TestAddToCache_LeastFrequentlyUsed(t *testing.T) { } func TestCacheStruct_Contains(t *testing.T) { - config.InitConfigWithPath(path) + config.InitConfig() config.SetCacheModel(0) cache := CacheStruct{