diff --git a/testmodules/options/test.nim b/testmodules/options/test.nim index c6fc8a0..e79140c 100644 --- a/testmodules/options/test.nim +++ b/testmodules/options/test.nim @@ -172,6 +172,11 @@ suite "optionals": else: fail() + if (a, b) =? none (string, int): + discard a + discard b + fail() + test "=? binds and unpacks tuples with named fields": if (a, b) =? (some (desc: "test", id: 1)): check a == "test" diff --git a/testmodules/result/test.nim b/testmodules/result/test.nim index 81880c1..66aa2d6 100644 --- a/testmodules/result/test.nim +++ b/testmodules/result/test.nim @@ -172,6 +172,11 @@ suite "result": else: fail() + if (a, b) =? (string, int).failure(error): + discard a + discard b + fail() + test "=? binds and unpacks tuples with named fields": if (a, b) =? (success (desc: "test", id: 1)): check a == "test"