From 8f08f794b018aa76ea38d8a97e84e1333b8faa77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erik=20Sved=C3=A4ng?= Date: Wed, 29 Apr 2020 14:01:41 +0200 Subject: [PATCH] One more test. --- test/result.carp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/result.carp b/test/result.carp index 8a5b0f00..0750e1c5 100644 --- a/test/result.carp +++ b/test/result.carp @@ -129,5 +129,14 @@ &(Maybe.Nothing) &(to-maybe (the (Result Int String) (Error @"error"))) "to-maybe works with Error" + ) + + (assert-equal test + 123 + (match (the (Result (Result Int String) String) (Success (Success 123))) + (Success (Error _)) 0 + (Error _) 0 + (Success (Success x)) x) + "matching on nested results" ) )