This commit is contained in:
Patrick Stevens
2022-12-05 22:10:54 +00:00
committed by GitHub
parent 659c67a3e5
commit 0a498ac7d4
11 changed files with 802 additions and 72 deletions

View File

@@ -8,14 +8,14 @@ open AdventOfCode2022
[<TestFixture>]
module TestDay2 =
[<Test>]
let ``Part 1, given`` () =
let testInput =
"""A Y
B X
C Z"""
|> fun s -> s.Split System.Environment.NewLine
|> Day2.part1
|> shouldEqual 15
[<Test>]
let ``Part 1, given`` () =
testInput.Split Environment.NewLine |> Day2.part1 |> shouldEqual 15
[<Test>]
let ``Part 1`` () =
@@ -25,12 +25,7 @@ C Z"""
[<Test>]
let ``Part 2, given`` () =
"""A Y
B X
C Z"""
|> fun s -> s.Split System.Environment.NewLine
|> Day2.part2
|> shouldEqual 12
testInput.Split Environment.NewLine |> Day2.part2 |> shouldEqual 12
[<Test>]
let ``Part 2`` () =