Skip to content

Commit 324dc35

Browse files
committed
Day 4: cleanup
1 parent 0787db7 commit 324dc35

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/test/scala/Day04Suite.scala

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class Day04Suite extends ScalaCheckSuite:
2626
test("big input parsed to something"):
2727
assert(Grid.parse(rows = bigInput).isDefined)
2828

29-
test("Grid allPositions example"):
29+
test("Grid all positions example"):
3030
assertEquals(
3131
Grid(
3232
rows = List(
@@ -44,10 +44,10 @@ class Day04Suite extends ScalaCheckSuite:
4444
)
4545
)
4646

47-
property("Grid |allPositions| = rows * columns"):
47+
property("Grid # all positions is rows * columns"):
4848
forAll(nonEmptyGridGen)(neg => assertEquals(neg.allPositions.length, neg.rows.length * neg.rows.head.length))
4949

50-
test("horizontalPositions example"):
50+
test("horizontal positions example"):
5151
assertEquals(
5252
Grid.horizontalPositions(wordLength = 3)(from = Pos(row = 2, col = 4)),
5353
List(
@@ -57,7 +57,7 @@ class Day04Suite extends ScalaCheckSuite:
5757
)
5858
)
5959

60-
test("verticalPositions example"):
60+
test("vertical positions example"):
6161
assertEquals(
6262
Grid.verticalPositions(wordLength = 3)(from = Pos(row = 2, col = 4)),
6363
List(
@@ -67,7 +67,7 @@ class Day04Suite extends ScalaCheckSuite:
6767
)
6868
)
6969

70-
test("ascDiagonalPositions example"):
70+
test("ascending diagonal positions example"):
7171
assertEquals(
7272
Grid.ascDiagonalPositions(wordLength = 3)(from = Pos(row = 2, col = 4)),
7373
List(
@@ -77,7 +77,7 @@ class Day04Suite extends ScalaCheckSuite:
7777
)
7878
)
7979

80-
test("descDiagonalPositions example"):
80+
test("descending diagonal positions example"):
8181
assertEquals(
8282
Grid.descDiagonalPositions(wordLength = 3)(from = Pos(row = 2, col = 4)),
8383
List(
@@ -87,18 +87,18 @@ class Day04Suite extends ScalaCheckSuite:
8787
)
8888
)
8989

90-
test("small input contains 18 \"XMAS\" occurrences"):
90+
test("small input contains 18 XMAS occurrences"):
9191
assertEquals(Grid.parse(smallInput).map(_.allOccurrences("XMAS")), 18.some)
9292

93-
test("big input contains 2_578 \"XMAS\" occurrences"):
93+
test("big input contains 2_578 XMAS occurrences"):
9494
assertEquals(Grid.parse(bigInput).map(_.allOccurrences("XMAS")), 2_578.some)
9595

9696
// part 2
9797

98-
test("small input contains 9 cross-\"MAS\" occurrences"):
98+
test("small input contains 9 X-MAS occurrences"):
9999
assertEquals(Grid.parse(smallInput).map(_.allCrossOccurrences("MAS")), 9.some)
100100

101-
test("big input contains 1_972 cross-\"MAS\" occurrences"):
101+
test("big input contains 1_972 X-MAS occurrences"):
102102
assertEquals(Grid.parse(bigInput).map(_.allCrossOccurrences("MAS")), 1_972.some)
103103

104104
object Day04Suite:

0 commit comments

Comments
 (0)