-
Notifications
You must be signed in to change notification settings - Fork 0
/
Day11Test.kt
43 lines (36 loc) · 992 Bytes
/
Day11Test.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
package io.dmitrijs.aoc2023
import io.dmitrijs.aoc2023.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 11")
internal class Day11Test {
@Nested
inner class Example {
private val day = Day11(resourceAsLines("day11_example"))
@Test
fun puzzle1() {
assertEquals(374, day.puzzle1())
}
@Test
fun puzzle2() {
assertEquals(1_030, day.puzzle2(10))
assertEquals(8_410, day.puzzle2(100))
}
}
@Nested
@Tag("personal")
inner class Problem {
private val day = Day11(resourceAsLines("day11"))
@Test
fun puzzle1() {
assertEquals(9_418_609, day.puzzle1())
}
@Test
fun puzzle2() {
assertEquals(593_821_230_983, day.puzzle2(1_000_000))
}
}
}