-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAdventTest.kt
48 lines (45 loc) · 1.29 KB
/
AdventTest.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
44
45
46
47
48
import org.junit.jupiter.api.Test
import kotlin.test.assertEquals
internal class AdventTest {
@Test
fun `test days outputs`() {
expectedOutputs.forEachIndexed { idx, expect ->
val out = catchSystemOut { AdventDay.all[idx].solve() }
assertEquals(expect, out)
}
println("Passed tests for ${expectedOutputs.size} days")
}
private val expectedOutputs = mutableListOf(
"1553\n1597\n",
"1989265\n2089174012\n",
"3958484\n1613181\n",
"82440\n20774\n",
"6311\n19929\n",
"374994\n1686252324092\n",
"352331\n99266250\n",
"369\n1031553\n",
"439\n900900\n",
"318081\n4361305341\n",
"1620\n371\n",
"4773\n116985\n",
"706\n" +
"#....###..####...##.###....##.####.#..#\n" +
"#....#..#.#.......#.#..#....#.#....#..#\n" +
"#....#..#.###.....#.###.....#.###..####\n" +
"#....###..#.......#.#..#....#.#....#..#\n" +
"#....#.#..#....#..#.#..#.#..#.#....#..#\n" +
"####.#..#.#.....##..###...##..####.#..#\n\n",
"2360\n2967977072188\n",
"720\n3025\n",
"847\n333794664059\n",
"3916\n2986\n",
"2501\n4935\n",
"467\n12226\n",
"4928\n16605\n",
"720750\n275067741811212\n",
"603661\n1237264238382479\n",
"14371\n40941\n",
"94399898949959\n21176121611511\n",
"518\n",
)
}