Skip to content

Commit

Permalink
fixed go package
Browse files Browse the repository at this point in the history
  • Loading branch information
VHPL-UIS committed Aug 31, 2023
1 parent 858859a commit b366a3d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 2 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
)
3 changes: 3 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down
9 changes: 4 additions & 5 deletions model/parts/types/cache_struct_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down Expand Up @@ -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{
Expand Down Expand Up @@ -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{
Expand All @@ -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")
}
Expand All @@ -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{
Expand Down

0 comments on commit b366a3d

Please sign in to comment.