Initial commit of day 1

This commit is contained in:
Smaug123
2021-12-06 19:37:33 +00:00
commit 7d24b7d8d0
15 changed files with 2248 additions and 0 deletions

25
Test/Test.fsproj Normal file
View File

@@ -0,0 +1,25 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Compile Include="TestDay1.fs" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="FsUnit" Version="4.1.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\AdventOfCode2021.fsproj" />
</ItemGroup>
</Project>

17
Test/TestDay1.fs Normal file
View File

@@ -0,0 +1,17 @@
namespace AdventOfCode2021.Test
open AdventOfCode
open Xunit
open FsUnitTyped
module TestDay1 =
[<Fact>]
let ``Part 1`` () =
Day1.part1 ()
|> shouldEqual 1766
[<Fact>]
let ``Part 2`` () =
Day1.part2 ()
|> shouldEqual 1797