mirror of
https://github.com/Smaug123/AdventOfCode2022
synced 2025-10-06 01:58:41 +00:00
Day 23 (#35)
This commit is contained in:
39
AdventOfCode2022.Test/Day23.fs
Normal file
39
AdventOfCode2022.Test/Day23.fs
Normal file
@@ -0,0 +1,39 @@
|
||||
namespace AdventOfCode2022.Test
|
||||
|
||||
open NUnit.Framework
|
||||
open FsUnitTyped
|
||||
open AdventOfCode2022
|
||||
|
||||
[<TestFixture>]
|
||||
module TestDay23 =
|
||||
|
||||
let input =
|
||||
"""....#..
|
||||
..###.#
|
||||
#...#.#
|
||||
.#...##
|
||||
#.###..
|
||||
##.#.##
|
||||
.#..#..
|
||||
"""
|
||||
|
||||
[<Test>]
|
||||
let ``Part 1, given`` () =
|
||||
Day23.part1 (StringSplitEnumerator.make '\n' input) |> shouldEqual 110
|
||||
|
||||
[<Test>]
|
||||
let ``Part 1`` () =
|
||||
let input = Assembly.readResource "Day23.txt"
|
||||
|
||||
Day23.part1 (StringSplitEnumerator.make '\n' input) |> shouldEqual 4025
|
||||
|
||||
|
||||
[<Test>]
|
||||
let ``Part 2, given`` () =
|
||||
Day23.part2 (StringSplitEnumerator.make '\n' input) |> shouldEqual 20
|
||||
|
||||
[<Test>]
|
||||
let ``Part 2`` () =
|
||||
let input = Assembly.readResource "Day23.txt"
|
||||
|
||||
Day23.part2 (StringSplitEnumerator.make '\n' input) |> shouldEqual 935
|
Reference in New Issue
Block a user