diff --git a/2024/aoc2024.fsproj b/2024/aoc2024.fsproj index 7fcda34..716c5c2 100644 --- a/2024/aoc2024.fsproj +++ b/2024/aoc2024.fsproj @@ -12,6 +12,7 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive + diff --git a/2024/src/Day00.fs b/2024/src/Day00.fs index 5d15de9..8b7f2e2 100644 --- a/2024/src/Day00.fs +++ b/2024/src/Day00.fs @@ -1,11 +1,11 @@ namespace aoc2024 open Xunit +open FsUnit.Xunit +open Util module Day00 = [] - let ``Part 01`` () = - let lines = Util.ReadInput("day00-input.txt") - let first = lines |> Seq.head |> int - Assert.Equal(0, first) + let ``part 01``() = + input "day00-input.txt" |> Seq.head |> int |> should equal 0 diff --git a/2024/src/Util.fs b/2024/src/Util.fs index 03fc4a9..71fb268 100644 --- a/2024/src/Util.fs +++ b/2024/src/Util.fs @@ -4,6 +4,6 @@ open System module Util = - let ReadInput(name: string) = + let input(name: string) = let path = $"{Reflection.Assembly.GetExecutingAssembly().Location}/../../../../data/{name}" seq { yield! IO.File.ReadLines path } \ No newline at end of file