-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDay8KtTest.kt
27 lines (23 loc) · 913 Bytes
/
Day8KtTest.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
package aoc2018.day08
import org.junit.jupiter.api.Assertions.assertEquals
import org.junit.jupiter.api.Test
internal class Day8KtTest {
@Test
fun test_sumMetadata() {
val input1 = "src/main/kotlin/aoc2018/day08/input/input"
val input2 = "src/main/kotlin/aoc2018/day08/input/input2"
val input3 = "src/main/kotlin/aoc2018/day08/input/input3"
val input4 = "src/main/kotlin/aoc2018/day08/input/input4"
assertEquals(37262, sumMetadata(input1))
assertEquals(138, sumMetadata(input2))
assertEquals(104, sumMetadata(input4))
assertEquals(99, sumMetadata(input3))
}
@Test
fun test_getRootScore() {
val input1 = "src/main/kotlin/aoc2018/day08/input/input"
val input2 = "src/main/kotlin/aoc2018/day08/input/input2"
assertEquals(20839, getRootScore(input1))
assertEquals(66, getRootScore(input2))
}
}