mirror of
https://github.com/logos-storage/questionable.git
synced 2026-01-08 08:43:09 +00:00
Use ? instead of Option[] in tests
This commit is contained in:
parent
e7afaeac49
commit
6ccb74419f
@ -180,7 +180,7 @@ suite "optionals":
|
|||||||
fail()
|
fail()
|
||||||
|
|
||||||
test "=? binds and unpacks tuples returned from proc":
|
test "=? binds and unpacks tuples returned from proc":
|
||||||
proc returnsTuple(): Option[tuple[name: string, id: int]] = some ("test", 1)
|
proc returnsTuple(): ?tuple[name: string, id: int] = some ("test", 1)
|
||||||
|
|
||||||
if (a, b) =? returnsTuple():
|
if (a, b) =? returnsTuple():
|
||||||
check a == "test"
|
check a == "test"
|
||||||
@ -189,7 +189,7 @@ suite "optionals":
|
|||||||
fail()
|
fail()
|
||||||
|
|
||||||
test "=? binds and unpacks tuples returned from proc with unnamed fields":
|
test "=? binds and unpacks tuples returned from proc with unnamed fields":
|
||||||
proc returnsTuple(): Option[(string, int,)] = some ("test", 1,)
|
proc returnsTuple(): ?(string, int,) = some ("test", 1,)
|
||||||
|
|
||||||
if (a, b,) =? returnsTuple():
|
if (a, b,) =? returnsTuple():
|
||||||
check a == "test"
|
check a == "test"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user