17 lines
369 B
Forth
17 lines
369 B
Forth
|
module Tests.Result
|
||
|
|
||
|
open NUnit.Framework
|
||
|
|
||
|
open Pentole.TestsExtensions
|
||
|
|
||
|
open Pentole
|
||
|
|
||
|
[<Test>]
|
||
|
let err_test () =
|
||
|
let got = ResultList.collect (Result.protect int) ["123"; "abc"; "456"]
|
||
|
let msg = "The input string 'abc' was not in a correct format."
|
||
|
|
||
|
match got with
|
||
|
| Ok _ -> Assert.Fail "Expected an error"
|
||
|
| Error exn -> Assert.are_equal exn.Message msg
|