Pentole/tests/result_tests.fs
Francesco Mecca 0cb819acf0 more
2024-12-12 11:37:59 +01:00

16 lines
352 B
Forth

module Tests.Result
open NUnit.Framework
open Pentole.Assert
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 -> areEqual exn.Message msg