mirror of
https://github.com/Smaug123/AdventOfCode2022
synced 2025-10-22 17:48:39 +00:00
Day 24 (#39)
This commit is contained in:
38
AdventOfCode2022.Test/Day24.fs
Normal file
38
AdventOfCode2022.Test/Day24.fs
Normal 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
|
Reference in New Issue
Block a user