Skip to content

Commit ba774c9

Browse files
committed
Fix project structure
1 parent 8a0eed2 commit ba774c9

File tree

4 files changed

+12
-6
lines changed

4 files changed

+12
-6
lines changed

src/main/kotlin/com/github/kotlinhandson/aoc/Day01.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
package com.github.kotlinhandson.aoc
22

3+
import com.github.kotlinhandson.aoc.utils.ints
4+
35
class 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.

src/test/kotlin/com/github/kotlinhandson/aoc/Day01Test.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff 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
}

src/test/kotlin/com/github/kotlinhandson/aoc/DayTest.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff 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) {

0 commit comments

Comments
 (0)