This commit is contained in:
2020-07-01 23:24:29 +02:00
parent 1783232b8e
commit 3789b21ef2
5 changed files with 1145 additions and 5 deletions

View File

@@ -20,12 +20,12 @@ test "Check proc results":
check data.val == "This is test code!"
test "Check failing proc":
proc destinedToFail(): OP[int] =
result.fail "no data found"
proc someProc(): OP[int] =
result.fail "Not implemented!"
let data = destinedToFail()
check data.isOk == false
check data.error == "no data found"
let data = someProc()
assert data.isOk == false
assert data.error == "Not implemented!"
test "Check changing result":
proc checker(): OP[int] =