This commit is contained in:
Patrick Stevens
2022-12-24 13:41:03 +00:00
committed by GitHub
parent 34dab08fbf
commit 19fa3a96b0
12 changed files with 397 additions and 23 deletions

View File

@@ -0,0 +1,38 @@
namespace AdventOfCode2022.Test
open NUnit.Framework
open FsUnitTyped
open AdventOfCode2022
[<TestFixture>]
module TestDay24 =
let input =
"""#.######
#>>.<^<#
#.<..<<#
#>v.><>#
#<^v^^>#
######.#
"""
[<Test>]
let ``Part 1, given`` () =
Day24.part1 (StringSplitEnumerator.make '\n' input) |> shouldEqual 18
[<Test>]
let ``Part 1`` () =
let input = Assembly.readResource "Day24.txt"
Day24.part1 (StringSplitEnumerator.make '\n' input) |> shouldEqual 283
[<Test>]
let ``Part 2, given`` () =
Day24.part2 (StringSplitEnumerator.make '\n' input) |> shouldEqual 54
[<Test>]
let ``Part 2`` () =
let input = Assembly.readResource "Day24.txt"
Day24.part2 (StringSplitEnumerator.make '\n' input) |> shouldEqual 883