From 0035966028e31387a427a914f1e66ba5bc3e86d4 Mon Sep 17 00:00:00 2001 From: Nat Quayle Nelson Date: Sun, 25 Sep 2022 20:17:07 +0000 Subject: [PATCH] catch previously allowed case errors --- kiss/src/test/cases/BasicTestCase.kiss | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/kiss/src/test/cases/BasicTestCase.kiss b/kiss/src/test/cases/BasicTestCase.kiss index faa2f41f..b8388308 100644 --- a/kiss/src/test/cases/BasicTestCase.kiss +++ b/kiss/src/test/cases/BasicTestCase.kiss @@ -361,6 +361,10 @@ From:[(assert false (+ \"false \" \"should \" \"have \" \"been \" \"true\"))]" m (if value (Some value) None)) (function _testCase [] + // otherwise branch must come last + (assertThrowsAtCompileTime (case null (otherwise "thing") (v "OtherThing"))) + // null must be matched + (assertThrowsAtCompileTime (case null (v "thing"))) (case (toOption []) (None (Assert.pass)) (never otherwise))