mirror of
https://github.com/Smaug123/mystery-hunt-2023-reactivation
synced 2025-10-14 00:48:43 +00:00
A bit of productionising
This commit is contained in:
28
Reactivation.Test/Reactivation.Test.fsproj
Normal file
28
Reactivation.Test/Reactivation.Test.fsproj
Normal file
@@ -0,0 +1,28 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
|
||||
<IsPackable>false</IsPackable>
|
||||
<RootNamespace>Reactivation.Test</RootNamespace>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Include="TestSeq.fs" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="FsCheck" Version="2.16.5" />
|
||||
<PackageReference Include="FsUnit" Version="5.2.0" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.2" />
|
||||
<PackageReference Include="NUnit" Version="3.13.3" />
|
||||
<PackageReference Include="NUnit3TestAdapter" Version="4.2.1" />
|
||||
<PackageReference Include="NUnit.Analyzers" Version="3.3.0" />
|
||||
<PackageReference Include="coverlet.collector" Version="3.1.2" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Reactivation\Reactivation.fsproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
21
Reactivation.Test/TestSeq.fs
Normal file
21
Reactivation.Test/TestSeq.fs
Normal file
@@ -0,0 +1,21 @@
|
||||
namespace Reactivation.Test
|
||||
|
||||
open FsUnitTyped
|
||||
open NUnit.Framework
|
||||
open Reactivation
|
||||
open FsCheck
|
||||
|
||||
[<TestFixture>]
|
||||
module TestSeq =
|
||||
|
||||
[<Test>]
|
||||
let ``Seq.range works`` () : unit =
|
||||
Seq.rangeOrZero Seq.empty |> shouldEqual 0
|
||||
|
||||
let prop (i : int) (s : int list) =
|
||||
let s = i :: s
|
||||
Seq.rangeOrZero s
|
||||
|> (=) (Seq.max s - Seq.min s)
|
||||
|
||||
prop
|
||||
|> Check.QuickThrowOnFailure
|
Reference in New Issue
Block a user