Day 6 and standalone app (#7)

This commit is contained in:
Patrick Stevens
2022-12-06 08:25:16 +00:00
committed by GitHub
parent 0a498ac7d4
commit ef903b33a9
18 changed files with 288 additions and 99 deletions

View File

@@ -15,19 +15,19 @@ C Z"""
[<Test>]
let ``Part 1, given`` () =
testInput.Split Environment.NewLine |> Day2.part1 |> shouldEqual 15
Day2.part1 (StringSplitEnumerator.make '\n' testInput) |> shouldEqual 15
[<Test>]
let ``Part 1`` () =
let input = Assembly.readResource "Day2.txt"
input.Split '\n' |> Day2.part1 |> shouldEqual 9651
Day2.part1 (StringSplitEnumerator.make '\n' input) |> shouldEqual 9651
[<Test>]
let ``Part 2, given`` () =
testInput.Split Environment.NewLine |> Day2.part2 |> shouldEqual 12
Day2.part2 (StringSplitEnumerator.make '\n' testInput) |> shouldEqual 12
[<Test>]
let ``Part 2`` () =
let input = Assembly.readResource "Day2.txt"
input.Split '\n' |> Day2.part2 |> shouldEqual 10560
Day2.part2 (StringSplitEnumerator.make '\n' input) |> shouldEqual 10560