mirror of
https://github.com/logos-storage/questionable.git
synced 2026-01-04 06:43:10 +00:00
Use ? instead of Option[] in tests
This commit is contained in:
parent
e7afaeac49
commit
6ccb74419f
@ -180,7 +180,7 @@ suite "optionals":
|
||||
fail()
|
||||
|
||||
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():
|
||||
check a == "test"
|
||||
@ -189,7 +189,7 @@ suite "optionals":
|
||||
fail()
|
||||
|
||||
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():
|
||||
check a == "test"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user