-
Notifications
You must be signed in to change notification settings - Fork 0
/
Day01Test.kt
40 lines (34 loc) · 925 Bytes
/
Day01Test.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
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 1")
internal class Day01Test {
@Nested
inner class Example {
@Test
fun puzzle1() {
assertEquals(142, Day01(resourceAsLines("day01_example_a")).puzzle1())
}
@Test
fun puzzle2() {
assertEquals(281, Day01(resourceAsLines("day01_example_b")).puzzle2())
}
}
@Nested
@Tag("personal")
inner class Problem {
private val day = Day01(resourceAsLines("day01"))
@Test
fun puzzle1() {
assertEquals(54_632, day.puzzle1())
}
@Test
fun puzzle2() {
assertEquals(54_019, day.puzzle2())
}
}
}