-
Notifications
You must be signed in to change notification settings - Fork 1
/
TextCompressorGzipTest.kt
54 lines (48 loc) · 1.15 KB
/
TextCompressorGzipTest.kt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
package gecko
import com.google.common.truth.Truth.assertThat
import gecko.test.TestBlueprint
import org.junit.jupiter.api.BeforeEach
import org.junit.jupiter.api.Test
internal class TextCompressorGzipTest : TestBlueprint {
private lateinit var compressor: TextCompressorGzip
@BeforeEach
override fun prepare() {
super.prepare()
compressor = TextCompressorGzip()
}
@Test
fun `returns compressed bytes`() {
val output = compressor.compress("hello world!".encodeToByteArray())
assertThat(output).isEqualTo(
byteArrayOf(
31,
-117,
8,
0,
0,
0,
0,
0,
0,
-1,
-53,
72,
-51,
-55,
-55,
87,
40,
-49,
47,
-54,
73,
81,
4,
0,
109,
-62,
-76, 3, 12, 0, 0, 0
)
)
}
}