File tree Expand file tree Collapse file tree 18 files changed +92
-18
lines changed
src/test/java/com/github/kfarnung/adventofcode/aoc2023/day01
src/test/java/com/github/kfarnung/adventofcode/aoc2023/day02
src/test/java/com/github/kfarnung/adventofcode/aoc2023/day03
src/test/java/com/github/kfarnung/adventofcode/aoc2023/day04
src/test/java/com/github/kfarnung/adventofcode/aoc2023/day05
src/test/java/com/github/kfarnung/adventofcode/aoc2023/day06
src/test/java/com/github/kfarnung/adventofcode/aoc2023/day07
src/test/java/com/github/kfarnung/adventofcode/aoc2023/day08
src/test/java/com/github/kfarnung/adventofcode/aoc2023/day09 Expand file tree Collapse file tree 18 files changed +92
-18
lines changed Original file line number Diff line number Diff line change @@ -9,3 +9,13 @@ dependencies {
99application {
1010 mainClass.set(" com.github.kfarnung.adventofcode.aoc2023.day01.App" )
1111}
12+
13+ sourceSets {
14+ test {
15+ resources {
16+ setSrcDirs(listOf (" ../../private/inputs/2023" ))
17+ }
18+ }
19+ }
20+
21+
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ void testGetPart1() throws IOException {
2121 "treb7uchet" );
2222 assertEquals ("142" , App .getPart1 (testInput ));
2323
24- List <String > realInput = readLinesFromResources (this , "input .txt" );
24+ List <String > realInput = readLinesFromResources (this , "day01 .txt" );
2525 assertEquals ("54697" , App .getPart1 (realInput ));
2626 }
2727
@@ -37,7 +37,7 @@ void testGetPart2() throws IOException {
3737 "7pqrstsixteen" );
3838 assertEquals ("281" , App .getPart2 (testInput ));
3939
40- List <String > realInput = readLinesFromResources (this , "input .txt" );
40+ List <String > realInput = readLinesFromResources (this , "day01 .txt" );
4141 assertEquals ("54885" , App .getPart2 (realInput ));
4242 }
4343}
Original file line number Diff line number Diff line change @@ -9,3 +9,11 @@ dependencies {
99application {
1010 mainClass.set(" com.github.kfarnung.adventofcode.aoc2023.day02.App" )
1111}
12+
13+ sourceSets {
14+ test {
15+ resources {
16+ setSrcDirs(listOf (" ../../private/inputs/2023" ))
17+ }
18+ }
19+ }
Original file line number Diff line number Diff line change @@ -22,15 +22,15 @@ class AppTest {
2222 void testGetPart1 () throws IOException {
2323 assertEquals ("8" , App .getPart1 (testInput ));
2424
25- List <String > realInput = readLinesFromResources (this , "input .txt" );
25+ List <String > realInput = readLinesFromResources (this , "day02 .txt" );
2626 assertEquals ("2913" , App .getPart1 (realInput ));
2727 }
2828
2929 @ Test
3030 void testGetPart2 () throws IOException {
3131 assertEquals ("2286" , App .getPart2 (testInput ));
3232
33- List <String > realInput = readLinesFromResources (this , "input .txt" );
33+ List <String > realInput = readLinesFromResources (this , "day02 .txt" );
3434 assertEquals ("55593" , App .getPart2 (realInput ));
3535 }
3636}
Original file line number Diff line number Diff line change @@ -9,3 +9,11 @@ dependencies {
99application {
1010 mainClass.set(" com.github.kfarnung.adventofcode.aoc2023.day03.App" )
1111}
12+
13+ sourceSets {
14+ test {
15+ resources {
16+ setSrcDirs(listOf (" ../../private/inputs/2023" ))
17+ }
18+ }
19+ }
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ void testGetPart1() throws IOException {
4141 assertEquals ("4361" , App .getPart1 (testInput ));
4242 assertEquals ("4361" , App .getPart1 (testInput2 ));
4343
44- List <String > realInput = readLinesFromResources (this , "input .txt" );
44+ List <String > realInput = readLinesFromResources (this , "day03 .txt" );
4545 assertEquals ("512794" , App .getPart1 (realInput ));
4646 }
4747
@@ -50,7 +50,7 @@ void testGetPart2() throws IOException {
5050 assertEquals ("467835" , App .getPart2 (testInput ));
5151 assertEquals ("467835" , App .getPart2 (testInput2 ));
5252
53- List <String > realInput = readLinesFromResources (this , "input .txt" );
53+ List <String > realInput = readLinesFromResources (this , "day03 .txt" );
5454 assertEquals ("67779080" , App .getPart2 (realInput ));
5555 }
5656}
Original file line number Diff line number Diff line change @@ -9,3 +9,11 @@ dependencies {
99application {
1010 mainClass.set(" com.github.kfarnung.adventofcode.aoc2023.day04.App" )
1111}
12+
13+ sourceSets {
14+ test {
15+ resources {
16+ setSrcDirs(listOf (" ../../private/inputs/2023" ))
17+ }
18+ }
19+ }
Original file line number Diff line number Diff line change @@ -24,15 +24,15 @@ class AppTest {
2424 void testGetPart1 () throws IOException {
2525 assertEquals ("13" , App .getPart1 (input ));
2626
27- List <String > realInput = readLinesFromResources (this , "input .txt" );
27+ List <String > realInput = readLinesFromResources (this , "day04 .txt" );
2828 assertEquals ("20829" , App .getPart1 (realInput ));
2929 }
3030
3131 @ Test
3232 void testGetPart2 () throws IOException {
3333 assertEquals ("30" , App .getPart2 (input ));
3434
35- List <String > realInput = readLinesFromResources (this , "input .txt" );
35+ List <String > realInput = readLinesFromResources (this , "day04 .txt" );
3636 assertEquals ("12648035" , App .getPart2 (realInput ));
3737 }
3838}
Original file line number Diff line number Diff line change @@ -9,3 +9,11 @@ dependencies {
99application {
1010 mainClass.set(" com.github.kfarnung.adventofcode.aoc2023.day05.App" )
1111}
12+
13+ sourceSets {
14+ test {
15+ resources {
16+ setSrcDirs(listOf (" ../../private/inputs/2023" ))
17+ }
18+ }
19+ }
Original file line number Diff line number Diff line change @@ -51,15 +51,15 @@ class AppTest {
5151 void testGetPart1 () throws IOException {
5252 assertEquals ("35" , App .getPart1 (input ));
5353
54- List <String > realInput = readLinesFromResources (this , "input .txt" );
54+ List <String > realInput = readLinesFromResources (this , "day05 .txt" );
5555 assertEquals ("510109797" , App .getPart1 (realInput ));
5656 }
5757
5858 @ Test
5959 void testGetPart2 () throws IOException {
6060 assertEquals ("46" , App .getPart2 (input ));
6161
62- List <String > realInput = readLinesFromResources (this , "input .txt" );
62+ List <String > realInput = readLinesFromResources (this , "day05 .txt" );
6363 assertEquals ("9622622" , App .getPart2 (realInput ));
6464 }
6565}
You can’t perform that action at this time.
0 commit comments