mirror of
https://github.com/Smaug123/AdventOfCode2021
synced 2025-10-05 15:58:40 +00:00
Initial commit of day 1
This commit is contained in:
25
Test/Test.fsproj
Normal file
25
Test/Test.fsproj
Normal 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
17
Test/TestDay1.fs
Normal 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
|
Reference in New Issue
Block a user