wp
This commit is contained in:
@@ -165,11 +165,10 @@ func TestCumulativeDeltaCompressor(t *testing.T) {
|
||||
var (
|
||||
fracDigits byte = 1
|
||||
buf = make([]byte, 8)
|
||||
payloadSize = 0
|
||||
compressionWay int
|
||||
requiredSpace int
|
||||
)
|
||||
c := NewCumulativeDeltaCompressor(buf, payloadSize, fracDigits)
|
||||
c := NewCumulativeDeltaCompressor(buf, fracDigits)
|
||||
for _, num := range testCase.Nums {
|
||||
compressionWay, requiredSpace = c.Evaluate(num)
|
||||
c.Compress(compressionWay, num)
|
||||
@@ -282,10 +281,9 @@ func TestCumulativeDeltaDecompressorFromState(t *testing.T) {
|
||||
var (
|
||||
fracDigits byte = 1
|
||||
buf = make([]byte, 16)
|
||||
payloadSize = 0
|
||||
decodedNums []float64
|
||||
)
|
||||
c := NewCumulativeDeltaCompressor(buf, payloadSize, fracDigits)
|
||||
c := NewCumulativeDeltaCompressor(buf, fracDigits)
|
||||
for _, num := range testCase.Nums {
|
||||
compressionWay, _ := c.Evaluate(num)
|
||||
c.Compress(compressionWay, num)
|
||||
@@ -526,11 +524,10 @@ func TestInstantDeltaCompressor(t *testing.T) {
|
||||
var (
|
||||
fracDigits byte = 1
|
||||
buf = make([]byte, 8)
|
||||
payloadSize = 0
|
||||
compressionWay int
|
||||
requiredSpace int
|
||||
)
|
||||
c := NewInstantDeltaCompressor(buf, payloadSize, fracDigits)
|
||||
c := NewInstantDeltaCompressor(buf, fracDigits)
|
||||
for _, num := range testCase.Nums {
|
||||
compressionWay, requiredSpace = c.Evaluate(num)
|
||||
c.Compress(compressionWay, num)
|
||||
@@ -643,10 +640,9 @@ func TestInstantDeltaDecompressorFromState(t *testing.T) {
|
||||
var (
|
||||
fracDigits byte = 1
|
||||
buf = make([]byte, 16)
|
||||
payloadSize = 0
|
||||
decodedNums []float64
|
||||
)
|
||||
c := NewInstantDeltaCompressor(buf, payloadSize, fracDigits)
|
||||
c := NewInstantDeltaCompressor(buf, fracDigits)
|
||||
for _, num := range testCase.Nums {
|
||||
compressionWay, _ := c.Evaluate(num)
|
||||
c.Compress(compressionWay, num)
|
||||
@@ -847,7 +843,7 @@ func TestTimeDeltaCompressor(t *testing.T) {
|
||||
compressionWay int
|
||||
requiredSpace int
|
||||
)
|
||||
c := NewTimeDeltaCompressor(buf, 0)
|
||||
c := NewTimeDeltaCompressor(buf)
|
||||
for _, num := range testCase.Nums {
|
||||
compressionWay, requiredSpace = c.Evaluate(num)
|
||||
c.Compress(compressionWay, num)
|
||||
@@ -963,7 +959,7 @@ func TestTimeDeltaDecompressorFromState(t *testing.T) {
|
||||
buf = make([]byte, 16)
|
||||
decodedNums []uint32
|
||||
)
|
||||
c := NewTimeDeltaCompressor(buf, 0)
|
||||
c := NewTimeDeltaCompressor(buf)
|
||||
for _, num := range testCase.Nums {
|
||||
compressionWay, _ := c.Evaluate(num)
|
||||
c.Compress(compressionWay, num)
|
||||
|
||||
Reference in New Issue
Block a user