burroarachidi
This commit is contained in:
parent
f3754356a1
commit
bb63df8a2d
3 changed files with 13 additions and 2 deletions
5
Makefile
5
Makefile
|
@ -1,6 +1,7 @@
|
|||
test:
|
||||
dotnet test
|
||||
|
||||
test_reports:
|
||||
dotnet test --collect "XPlat Code Coverage" --results-directory /tmp/pentole_reports/
|
||||
mv /tmp/pentole_reports/*/coverage.cobertura.xml coverage.cobertura.xml
|
||||
reportgenerator -targetdir:coverlet/reports -reporttypes:HtmlInline_AzurePipelines -repots:coverage.cobertura.xml
|
||||
mv /tmp/pentole_reports/*/coverage.cobertura.xml .
|
||||
reportgenerator -targetdir:coverlet/reports -reporttypes:HtmlInline_AzurePipelines -reports:coverage.cobertura.xml
|
||||
|
|
|
@ -9,6 +9,12 @@ type NUnit.Framework.Assert with
|
|||
| Ok got -> Assert.That (got, Is.EqualTo(expected))
|
||||
| Error e -> Assert.Fail $"Expected 'ok, got: {e}"
|
||||
|
||||
static member is_true (got: bool) =
|
||||
Assert.That (got, Is.True)
|
||||
|
||||
static member is_false (got: bool) =
|
||||
Assert.That (got, Is.False)
|
||||
|
||||
static member ok_is_true (r: Result<bool, 'a>) =
|
||||
match r with
|
||||
| Ok got -> Assert.That (got, Is.True)
|
||||
|
|
|
@ -6,6 +6,10 @@ open Pentole.TestsExtensions
|
|||
open Pentole.Path
|
||||
open Pentole.Result
|
||||
|
||||
[<Test>]
|
||||
let constructor_test () =
|
||||
"/" |> Path.of_string |> Result.isOk |> Assert.is_true
|
||||
'\000' |> string |> Path.of_string |> Result.isOk |> Assert.is_false
|
||||
[<Test>]
|
||||
let absolute_test () =
|
||||
let is_absolute = function
|
||||
|
|
Loading…
Reference in a new issue