github.com/TeaOSLab/EdgeNode@v1.3.8/internal/compressions/utils_test.go (about) 1 // Copyright 2024 GoEdge CDN goedge.cdn@gmail.com. All rights reserved. Official site: https://goedge.cn . 2 3 package compressions_test 4 5 import ( 6 "github.com/TeaOSLab/EdgeNode/internal/compressions" 7 "github.com/iwind/TeaGo/assert" 8 "testing" 9 ) 10 11 func TestGenerateCompressLevel(t *testing.T) { 12 var a = assert.NewAssertion(t) 13 14 t.Log(compressions.GenerateCompressLevel(0, 10)) 15 t.Log(compressions.GenerateCompressLevel(1, 10)) 16 t.Log(compressions.GenerateCompressLevel(1, 4)) 17 18 { 19 var level = compressions.GenerateCompressLevel(1, 2) 20 t.Log(level) 21 a.IsTrue(level >= 1 && level <= 2) 22 } 23 } 24 25 func TestCalculatePoolSize(t *testing.T) { 26 t.Log(compressions.CalculatePoolSize()) 27 }