add void tests (#84)

This commit is contained in:
Jacek Sieka 2021-07-07 10:12:20 +02:00 committed by GitHub
parent e10da4a90e
commit 3c91b8694e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 1 deletions

View File

@ -279,4 +279,13 @@ discard cstringF("test")
# Compare void
block:
var a, b: Result[void, bool]
discard a == b
doAssert a == b
a.ok()
doAssert not (a == b)
doAssert not (b == a)
b.ok()
doAssert a == b