From 7ce938062e596aa29258b3bb814079652e1326a6 Mon Sep 17 00:00:00 2001 From: Nat Quayle Nelson Date: Mon, 28 Mar 2022 19:00:33 -0600 Subject: [PATCH] fix test case for (and) --- kiss/src/test/cases/BasicTestCase.hx | 4 +--- kiss/src/test/cases/BasicTestCase.kiss | 7 ++++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/kiss/src/test/cases/BasicTestCase.hx b/kiss/src/test/cases/BasicTestCase.hx index 267ed6ce..f267b769 100644 --- a/kiss/src/test/cases/BasicTestCase.hx +++ b/kiss/src/test/cases/BasicTestCase.hx @@ -168,9 +168,7 @@ class BasicTestCase extends Test { } function testAnd() { - Assert.equals(6, BasicTestCase.myAnd1); - Assert.equals(null, BasicTestCase.myAnd2); - Assert.equals(null, BasicTestCase.myAnd3); + _testAnd(); } function testNot() { diff --git a/kiss/src/test/cases/BasicTestCase.kiss b/kiss/src/test/cases/BasicTestCase.kiss index e154f656..a1b84d2e 100644 --- a/kiss/src/test/cases/BasicTestCase.kiss +++ b/kiss/src/test/cases/BasicTestCase.kiss @@ -182,9 +182,10 @@ (Assert.equals (.toString []) (.toString (or null []))) (Assert.equals "" (or null [] ""))) -(var myAnd1 (and 5 6)) -(var myAnd2 (and false 5 6)) -(var myAnd3 (and 5 false 6)) +(function _testAnd [] + (Assert.equals 6 (and 5 6)) + (Assert.isFalse ?(and false 5 6)) + (Assert.isFalse ?(and 5 false 6))) (function mySetLocal [] (localVar &mut loc "one thing")