Scaffolding

This commit is contained in:
Smaug123
2023-12-07 23:55:46 +00:00
parent bcd2bb6349
commit afe82facb6
6 changed files with 94 additions and 0 deletions

View File

@@ -0,0 +1,46 @@
namespace AdventOfCode2023.Test
open System
open AdventOfCode2023
open NUnit.Framework
open FsUnitTyped
open System.IO
[<TestFixture>]
module TestDay8 =
let sample = Assembly.getEmbeddedResource typeof<Dummy>.Assembly "day8.txt"
[<Test>]
let part1Sample () =
sample |> Day8.part1 |> shouldEqual 0
[<Test>]
let part2Sample () =
sample |> Day8.part2 |> shouldEqual 0
[<Test>]
let part1Actual () =
let s =
try
File.ReadAllText (Path.Combine (__SOURCE_DIRECTORY__, "../../inputs/day8.txt"))
with
| :? DirectoryNotFoundException
| :? FileNotFoundException ->
Assert.Inconclusive ()
failwith "unreachable"
Day8.part1 s |> shouldEqual 0
[<Test>]
let part2Actual () =
let s =
try
File.ReadAllText (Path.Combine (__SOURCE_DIRECTORY__, "../../inputs/day8.txt"))
with
| :? DirectoryNotFoundException
| :? FileNotFoundException ->
Assert.Inconclusive ()
failwith "unreachable"
Day8.part2 s |> shouldEqual 0