namespace AdventOfCode2023.Test open AdventOfCode2023 open NUnit.Framework open FsUnitTyped open System.IO [] module TestDay11 = let sample = Assembly.getEmbeddedResource typeof.Assembly "day11.txt" [] let part1Sample () = sample |> Day11.part1 |> shouldEqual 374 [] let part2Sample () = sample |> Day11.part2 |> shouldEqual -1 [] let part1Actual () = let s = try File.ReadAllText (Path.Combine (__SOURCE_DIRECTORY__, "../../inputs/day11.txt")) with | :? DirectoryNotFoundException | :? FileNotFoundException -> Assert.Inconclusive () failwith "unreachable" Day11.part1 s |> shouldEqual 9947476 [] let part2Actual () = let s = try File.ReadAllText (Path.Combine (__SOURCE_DIRECTORY__, "../../inputs/day11.txt")) with | :? DirectoryNotFoundException | :? FileNotFoundException -> Assert.Inconclusive () failwith "unreachable" Day11.part2 s |> shouldEqual -1