-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDay8KtTest.kt
33 lines (25 loc) · 1.05 KB
/
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
28
29
30
31
32
33
package aoc2023.day08
import org.junit.jupiter.api.Assertions.assertEquals
import org.junit.jupiter.api.Test
import util.readInputLineByLine
internal class Day8KtTest {
private val testInputLines0 = readInputLineByLine("src/main/kotlin/aoc2023/day08/assets/input0")
private val testInput0 = parse(testInputLines0)
private val testInputLines1 = readInputLineByLine("src/main/kotlin/aoc2023/day08/assets/input1")
private val testInput1 = parse(testInputLines1)
private val testInputLines2 = readInputLineByLine("src/main/kotlin/aoc2023/day08/assets/input2")
private val testInput2 = parse(testInputLines2)
private val inputLines = readInputLineByLine("src/main/kotlin/aoc2023/day08/assets/input")
private val input = parse(inputLines)
@Test
fun testPart1() {
assertEquals(2, part1(testInput0))
assertEquals(6, part1(testInput1))
assertEquals(19667, part1(input))
}
@Test
fun testPart2() {
assertEquals(6, part2(testInput2))
assertEquals(19185263738117, part2(input))
}
}