This commit is contained in:
Andrew Glaze
2024-12-07 14:06:08 -05:00
parent 72acbeb8a0
commit 2f399ce790
2 changed files with 106 additions and 0 deletions

View File

@@ -0,0 +1,41 @@
package day05
import kotlin.test.Test
import util.InputDownloader
class Day05Test {
val dayNum = 5
val day = Day05()
val input = InputDownloader().getInput(dayNum)
val example = InputDownloader().getExample(dayNum)
@Test fun part1Example() {
part1(example, 143)
}
@Test fun part1Solution() {
part1(input, 6041)
}
@Test fun part2Example() {
part2(example, 123)
}
@Test fun part2Solution() {
part2(input, 4884)
}
fun part1(input: String, expected: Int) {
val output = day.part1(input)
println("output: $output")
assert(output == expected)
}
fun part2(input: String, expected: Int) {
val output = day.part2(input)
println("output: $output")
assert(output == expected)
}
}