Skip to content

Commit

Permalink
test(2024): day 4
Browse files Browse the repository at this point in the history
  • Loading branch information
scarf005 committed Dec 4, 2024
1 parent 4d06cef commit fb255a4
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions 2024/day04.test.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package `2024`.day04

import munit.FunSuite

val example =
"""|MMMSXXMASM
|MSAMXMSMSA
|AMXSXMAAMM
|MSAMASMSMX
|XMASAMXAMM
|XXAMMXXAMA
|SMSMSASXSS
|SAXAMASAAA
|MAMMMXMMMM
|MXMXAXMASX""".stripMargin.linesIterator.map(_.toVector).toVector

class Test extends FunSuite:
test("part 1"):
assertEquals(part1(example), 18)

test("part 2"):
assertEquals(part2(example), 9)

0 comments on commit fb255a4

Please sign in to comment.