File tree Expand file tree Collapse file tree 4 files changed +12
-6
lines changed
kotlin/com/github/kotlinhandson/aoc
test/kotlin/com/github/kotlinhandson/aoc Expand file tree Collapse file tree 4 files changed +12
-6
lines changed Original file line number Diff line number Diff line change 11package com.github.kotlinhandson.aoc
22
3+ import com.github.kotlinhandson.aoc.utils.ints
4+
35class Day01 : Day (1 ) {
46
57 override fun part1 (input : String ): Int {
6- return 0
8+ return input.ints().sum()
79 }
810
911 override fun part2 (input : String ): Int {
File renamed without changes.
Original file line number Diff line number Diff line change @@ -8,14 +8,14 @@ class Day01Test : DayTest() {
88 override val day = Day01 ()
99
1010 @Test
11- fun `Part 1` () {
12- assertEquals(0 , day.part1(" foo " )) // check against test input
13- assertEquals(0 , day.part1()) // check against input data
11+ override fun `Part 1` () {
12+ assertEquals(0 , day.part1(" test_input " )) // check against test input
13+ assertEquals(0 , day.part1()) // check solution against input data
1414 }
1515
1616 @Test
17- fun `Part 2` () {
18- assertEquals(0 , day.part2(" bar " ))
17+ override fun `Part 2` () {
18+ assertEquals(0 , day.part2(" test_input " ))
1919 assertEquals(0 , day.part2())
2020 }
2121}
Original file line number Diff line number Diff line change @@ -8,6 +8,10 @@ abstract class DayTest {
88
99 abstract val day: Day
1010
11+ abstract fun `Part 1` ()
12+
13+ abstract fun `Part 2` ()
14+
1115 @AfterAll
1216 fun solve () {
1317 with (day) {
You can’t perform that action at this time.
0 commit comments