This commit is contained in:
Smaug123
2023-12-05 20:05:32 +00:00
parent b063bce19a
commit 785dce4d2b
5 changed files with 180 additions and 9 deletions

View File

@@ -1,5 +1,6 @@
namespace AdventOfCode2023.Test
open System
open AdventOfCode2023
open NUnit.Framework
open FsUnitTyped
@@ -11,10 +12,10 @@ module TestDay5 =
let sample = Assembly.getEmbeddedResource typeof<Dummy>.Assembly "day5.txt"
[<Test>]
let part1Sample () = sample |> Day5.part1 |> shouldEqual 0
let part1Sample () = sample |> Day5.part1 |> shouldEqual (uint64 35)
[<Test>]
let part2Sample () = sample |> Day5.part2 |> shouldEqual 0
let part2Sample () = sample |> Day5.part2 |> shouldEqual (uint64 46)
[<Test>]
let part1Actual () =
@@ -27,7 +28,7 @@ module TestDay5 =
Assert.Inconclusive ()
failwith "unreachable"
Day5.part1 s |> shouldEqual 0
Day5.part1 s |> shouldEqual (uint64 806029445)
[<Test>]
let part2Actual () =
@@ -40,4 +41,4 @@ module TestDay5 =
Assert.Inconclusive ()
failwith "unreachable"
Day5.part2 s |> shouldEqual 0
Day5.part2 s |> shouldEqual (uint64 59370572)

View File

@@ -0,0 +1,33 @@
seeds: 79 14 55 13
seed-to-soil map:
50 98 2
52 50 48
soil-to-fertilizer map:
0 15 37
37 52 2
39 0 15
fertilizer-to-water map:
49 53 8
0 11 42
42 0 7
57 7 4
water-to-light map:
88 18 7
18 25 70
light-to-temperature map:
45 77 23
81 45 19
68 64 13
temperature-to-humidity map:
0 69 1
1 0 69
humidity-to-location map:
60 56 37
56 93 4