generated from kotlin-hands-on/advent-of-code-kotlin-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDay15Test.kt
42 lines (35 loc) · 962 Bytes
/
Day15Test.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
package io.dmitrijs.aoc2022
import io.dmitrijs.aoc2022.Resources.resourceAsLines
import org.junit.jupiter.api.DisplayName
import org.junit.jupiter.api.Nested
import org.junit.jupiter.api.Tag
import kotlin.test.Test
import kotlin.test.assertEquals
@DisplayName("Day 15")
internal class Day15Test {
@Nested
inner class Example {
private val day = Day15(resourceAsLines("day15_example"))
@Test
fun puzzle1() {
assertEquals(26, day.puzzle1(10))
}
@Test
fun puzzle2() {
assertEquals(56_000_011L, day.puzzle2(20))
}
}
@Nested
@Tag("personal")
inner class Problem {
private val day = Day15(resourceAsLines("day15"))
@Test
fun puzzle1() {
assertEquals(4_873_353, day.puzzle1(2_000_000))
}
@Test
fun puzzle2() {
assertEquals(11_600_823_139_120L, day.puzzle2(4_000_000))
}
}
}