diff --git a/AdventOfCode2023.FSharp/AdventOfCode2023.FSharp/Program.fs b/AdventOfCode2023.FSharp/AdventOfCode2023.FSharp/Program.fs index f7a946a..6d0c8b2 100644 --- a/AdventOfCode2023.FSharp/AdventOfCode2023.FSharp/Program.fs +++ b/AdventOfCode2023.FSharp/AdventOfCode2023.FSharp/Program.fs @@ -86,6 +86,10 @@ module Program = Console.Error.WriteLine ((1_000.0 * float sw.ElapsedTicks / float Stopwatch.Frequency).ToString () + "ms") endToEnd.Stop () - Console.Error.WriteLine ((1_000.0 * float endToEnd.ElapsedTicks / float Stopwatch.Frequency).ToString () + "ms total") + + Console.Error.WriteLine ( + (1_000.0 * float endToEnd.ElapsedTicks / float Stopwatch.Frequency).ToString () + + "ms total" + ) 0 diff --git a/AdventOfCode2023.FSharp/Test/TestDay1.fs b/AdventOfCode2023.FSharp/Test/TestDay1.fs index 6fe4416..5d003e6 100644 --- a/AdventOfCode2023.FSharp/Test/TestDay1.fs +++ b/AdventOfCode2023.FSharp/Test/TestDay1.fs @@ -38,7 +38,9 @@ zoneight234 let s = try File.ReadAllText (Path.Combine (__SOURCE_DIRECTORY__, "../../inputs/day1.txt")) - with :? FileNotFoundException -> + with + | :? DirectoryNotFoundException + | :? FileNotFoundException -> Assert.Inconclusive () failwith "unreachable" @@ -49,7 +51,9 @@ zoneight234 let s = try File.ReadAllText (Path.Combine (__SOURCE_DIRECTORY__, "../../inputs/day1.txt")) - with :? FileNotFoundException -> + with + | :? DirectoryNotFoundException + | :? FileNotFoundException -> Assert.Inconclusive () failwith "unreachable" diff --git a/AdventOfCode2023.FSharp/Test/TestDay2.fs b/AdventOfCode2023.FSharp/Test/TestDay2.fs index e484cd3..4624da5 100644 --- a/AdventOfCode2023.FSharp/Test/TestDay2.fs +++ b/AdventOfCode2023.FSharp/Test/TestDay2.fs @@ -28,7 +28,9 @@ Game 5: 6 red, 1 blue, 3 green; 2 blue, 1 red, 2 green let s = try File.ReadAllText (Path.Combine (__SOURCE_DIRECTORY__, "../../inputs/day2.txt")) - with :? FileNotFoundException -> + with + | :? DirectoryNotFoundException + | :? FileNotFoundException -> Assert.Inconclusive () failwith "unreachable" @@ -39,7 +41,9 @@ Game 5: 6 red, 1 blue, 3 green; 2 blue, 1 red, 2 green let s = try File.ReadAllText (Path.Combine (__SOURCE_DIRECTORY__, "../../inputs/day2.txt")) - with :? FileNotFoundException -> + with + | :? DirectoryNotFoundException + | :? FileNotFoundException -> Assert.Inconclusive () failwith "unreachable" diff --git a/AdventOfCode2023.FSharp/Test/TestDay3.fs b/AdventOfCode2023.FSharp/Test/TestDay3.fs index e09ca49..f709d20 100644 --- a/AdventOfCode2023.FSharp/Test/TestDay3.fs +++ b/AdventOfCode2023.FSharp/Test/TestDay3.fs @@ -77,7 +77,9 @@ module TestDay3 = let bytes = try File.ReadAllBytes (Path.Combine (__SOURCE_DIRECTORY__, "../../inputs/day3.txt")) - with :? FileNotFoundException -> + with + | :? DirectoryNotFoundException + | :? FileNotFoundException -> Assert.Inconclusive () failwith "unreachable" @@ -107,7 +109,9 @@ module TestDay3 = let bytes = try File.ReadAllBytes (Path.Combine (__SOURCE_DIRECTORY__, "../../inputs/day3.txt")) - with :? FileNotFoundException -> + with + | :? DirectoryNotFoundException + | :? FileNotFoundException -> Assert.Inconclusive () failwith "unreachable"