mirror of
https://github.com/Smaug123/AdventOfCode2022
synced 2025-10-11 04:28:43 +00:00
Day 6 and standalone app (#7)
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
namespace AdventOfCode2022.Test
|
||||
|
||||
open System
|
||||
open AdventOfCode2022
|
||||
open NUnit.Framework
|
||||
open FsUnitTyped
|
||||
@@ -28,18 +27,18 @@ module TestDay1 =
|
||||
[<Test>]
|
||||
let ``Part 1`` () =
|
||||
let input = Assembly.readResource "Day1.txt"
|
||||
input.Split '\n' |> Day1.part1 |> shouldEqual 66306
|
||||
Day1.part1 (StringSplitEnumerator.make '\n' input) |> shouldEqual 66306
|
||||
|
||||
[<Test>]
|
||||
let ``Part 2`` () =
|
||||
let input = Assembly.readResource "Day1.txt"
|
||||
input.Split '\n' |> Day1.part2 |> shouldEqual 195292
|
||||
Day1.part2 (StringSplitEnumerator.make '\n' input) |> shouldEqual 195292
|
||||
|
||||
[<Test>]
|
||||
let ``Part 1, given example`` () =
|
||||
testInput.Split Environment.NewLine |> Day1.part1 |> shouldEqual 24000
|
||||
Day1.part1 (StringSplitEnumerator.make '\n' testInput) |> shouldEqual 24000
|
||||
|
||||
|
||||
[<Test>]
|
||||
let ``Part 2, given example`` () =
|
||||
testInput.Split Environment.NewLine |> Day1.part2 |> shouldEqual 45000
|
||||
Day1.part2 (StringSplitEnumerator.make '\n' testInput) |> shouldEqual 45000
|
||||
|
Reference in New Issue
Block a user