diff --git a/kiss/src/test/cases/GenerativeTestCase.kiss b/kiss/src/test/cases/GenerativeTestCase.kiss index c2022c0f..4403c4c8 100644 --- a/kiss/src/test/cases/GenerativeTestCase.kiss +++ b/kiss/src/test/cases/GenerativeTestCase.kiss @@ -3,7 +3,7 @@ (defMacroVar maxExps 4) (defMacroFunction _macroList [func length] - ~(for _ (range length) (func))) + (for _ (range length) (func))) (defMacro macroRepeat [exp length] `(begin ,@(_macroList ->{exp} (eval length)))) @@ -12,7 +12,7 @@ (_macroList func (+ 2 (random (- maxExps 2))))) (defMacroFunction _randomLetterString [] - (ReaderExp.StrExp (apply + (for _ (range (random maxStringLength)) (chooseRandom (.split "abcdefghijklmnopqrstuvwxyz" "")))))) + (ReaderExp.StrExp (apply + (for _ (range (+ 1 (random (- maxStringLength 1)))) (chooseRandom (.split "abcdefghijklmnopqrstuvwxyz" "")))))) (defMacroFunction _randomFalsyExp [] ((chooseRandom @@ -24,7 +24,7 @@ ->{`(or ,@(_randomLengthMacroList _randomFalsyExp))} ->{`(and ,@(_randomLengthMacroList _randomUncertainExp) - (_randomFalsyExp) + ,(_randomFalsyExp) ,@(_randomLengthMacroList _randomUncertainExp))} ]))) (defMacro randomFalsyExp [] @@ -46,10 +46,10 @@ ->(_randomTruthyExp) ]))) (defMacro randomUncertainExp [] - ~(_randomUncertainExp)) + (_randomUncertainExp)) (function _testTruthy [] - (macroRepeat (Assert.isTrue ?(randomTruthyExp)) maxExps)) + (macroRepeat (Assert.isTrue ?(randomTruthyExp)) 10)) (function _testFalsy [] - (macroRepeat (Assert.isFalse ?(randomFalsyExp)) maxExps)) \ No newline at end of file + (macroRepeat (Assert.isFalse ?(randomFalsyExp)) 10)) \ No newline at end of file diff --git a/kiss/src/test/cases/MacroTestCase.kiss b/kiss/src/test/cases/MacroTestCase.kiss index 7ab37f25..d798e3f9 100644 --- a/kiss/src/test/cases/MacroTestCase.kiss +++ b/kiss/src/test/cases/MacroTestCase.kiss @@ -26,8 +26,8 @@ (doFor [name type] argPairs (untypedArgs.push name) (letBindings.push name) - (print type) - (print name) + // (print type) + // (print name) (letBindings.push `(the ,type ,name))) (print letBindings) `(function ,name ,untypedArgs