-
Notifications
You must be signed in to change notification settings - Fork 0
/
Day16Test.kt
35 lines (30 loc) · 866 Bytes
/
Day16Test.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
package io.dmitrijs.aoc2017
import org.junit.jupiter.api.DisplayName
import org.junit.jupiter.api.Nested
import kotlin.test.Test
import kotlin.test.assertEquals
@DisplayName("Day 16")
internal class Day16Test {
private val problemInput = Resources.resourceAsText("day16")
private val exampleInput = "s1,x3/4,pe/b"
@Nested
@DisplayName("Puzzle 1")
inner class Puzzle1 {
@Test
fun `solves example`() {
assertEquals("baedc", Day16(exampleInput, 5).puzzle1())
}
@Test
fun `solves problem`() {
assertEquals("namdgkbhifpceloj", Day16(problemInput).puzzle1())
}
}
@Nested
@DisplayName("Puzzle 2")
inner class Puzzle2 {
@Test
fun `solves problem`() {
assertEquals("ibmchklnofjpdeag", Day16(problemInput).puzzle2())
}
}
}