Use ? instead of Option[] in tests

This commit is contained in:
Mark Spanbroek 2023-02-13 11:24:31 +01:00
parent e7afaeac49
commit 6ccb74419f

View File

@ -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"