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 {
9
9
application {
10
10
mainClass.set(" com.github.kfarnung.adventofcode.aoc2023.day01.App" )
11
11
}
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 {
21
21
"treb7uchet" );
22
22
assertEquals ("142" , App .getPart1 (testInput ));
23
23
24
- List <String > realInput = readLinesFromResources (this , "input .txt" );
24
+ List <String > realInput = readLinesFromResources (this , "day01 .txt" );
25
25
assertEquals ("54697" , App .getPart1 (realInput ));
26
26
}
27
27
@@ -37,7 +37,7 @@ void testGetPart2() throws IOException {
37
37
"7pqrstsixteen" );
38
38
assertEquals ("281" , App .getPart2 (testInput ));
39
39
40
- List <String > realInput = readLinesFromResources (this , "input .txt" );
40
+ List <String > realInput = readLinesFromResources (this , "day01 .txt" );
41
41
assertEquals ("54885" , App .getPart2 (realInput ));
42
42
}
43
43
}
Original file line number Diff line number Diff line change @@ -9,3 +9,11 @@ dependencies {
9
9
application {
10
10
mainClass.set(" com.github.kfarnung.adventofcode.aoc2023.day02.App" )
11
11
}
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 {
22
22
void testGetPart1 () throws IOException {
23
23
assertEquals ("8" , App .getPart1 (testInput ));
24
24
25
- List <String > realInput = readLinesFromResources (this , "input .txt" );
25
+ List <String > realInput = readLinesFromResources (this , "day02 .txt" );
26
26
assertEquals ("2913" , App .getPart1 (realInput ));
27
27
}
28
28
29
29
@ Test
30
30
void testGetPart2 () throws IOException {
31
31
assertEquals ("2286" , App .getPart2 (testInput ));
32
32
33
- List <String > realInput = readLinesFromResources (this , "input .txt" );
33
+ List <String > realInput = readLinesFromResources (this , "day02 .txt" );
34
34
assertEquals ("55593" , App .getPart2 (realInput ));
35
35
}
36
36
}
Original file line number Diff line number Diff line change @@ -9,3 +9,11 @@ dependencies {
9
9
application {
10
10
mainClass.set(" com.github.kfarnung.adventofcode.aoc2023.day03.App" )
11
11
}
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 {
41
41
assertEquals ("4361" , App .getPart1 (testInput ));
42
42
assertEquals ("4361" , App .getPart1 (testInput2 ));
43
43
44
- List <String > realInput = readLinesFromResources (this , "input .txt" );
44
+ List <String > realInput = readLinesFromResources (this , "day03 .txt" );
45
45
assertEquals ("512794" , App .getPart1 (realInput ));
46
46
}
47
47
@@ -50,7 +50,7 @@ void testGetPart2() throws IOException {
50
50
assertEquals ("467835" , App .getPart2 (testInput ));
51
51
assertEquals ("467835" , App .getPart2 (testInput2 ));
52
52
53
- List <String > realInput = readLinesFromResources (this , "input .txt" );
53
+ List <String > realInput = readLinesFromResources (this , "day03 .txt" );
54
54
assertEquals ("67779080" , App .getPart2 (realInput ));
55
55
}
56
56
}
Original file line number Diff line number Diff line change @@ -9,3 +9,11 @@ dependencies {
9
9
application {
10
10
mainClass.set(" com.github.kfarnung.adventofcode.aoc2023.day04.App" )
11
11
}
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 {
24
24
void testGetPart1 () throws IOException {
25
25
assertEquals ("13" , App .getPart1 (input ));
26
26
27
- List <String > realInput = readLinesFromResources (this , "input .txt" );
27
+ List <String > realInput = readLinesFromResources (this , "day04 .txt" );
28
28
assertEquals ("20829" , App .getPart1 (realInput ));
29
29
}
30
30
31
31
@ Test
32
32
void testGetPart2 () throws IOException {
33
33
assertEquals ("30" , App .getPart2 (input ));
34
34
35
- List <String > realInput = readLinesFromResources (this , "input .txt" );
35
+ List <String > realInput = readLinesFromResources (this , "day04 .txt" );
36
36
assertEquals ("12648035" , App .getPart2 (realInput ));
37
37
}
38
38
}
Original file line number Diff line number Diff line change @@ -9,3 +9,11 @@ dependencies {
9
9
application {
10
10
mainClass.set(" com.github.kfarnung.adventofcode.aoc2023.day05.App" )
11
11
}
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 {
51
51
void testGetPart1 () throws IOException {
52
52
assertEquals ("35" , App .getPart1 (input ));
53
53
54
- List <String > realInput = readLinesFromResources (this , "input .txt" );
54
+ List <String > realInput = readLinesFromResources (this , "day05 .txt" );
55
55
assertEquals ("510109797" , App .getPart1 (realInput ));
56
56
}
57
57
58
58
@ Test
59
59
void testGetPart2 () throws IOException {
60
60
assertEquals ("46" , App .getPart2 (input ));
61
61
62
- List <String > realInput = readLinesFromResources (this , "input .txt" );
62
+ List <String > realInput = readLinesFromResources (this , "day05 .txt" );
63
63
assertEquals ("9622622" , App .getPart2 (realInput ));
64
64
}
65
65
}
You can’t perform that action at this time.
0 commit comments