@@ -86,7 +86,7 @@ const testIt = (p, expected_result) => {
86
86
let testCount = 0 ;
87
87
let allPassing = 1 ;
88
88
allPassing &= testIt ( "Hello Pounce" , [ "Hello" , "Pounce" ] ) ;
89
- allPassing &= testIt ( "words" , [ [ "words" , "word" , "dup" , "dup2" , "swap" , "drop" , "round" , "+" , "-" , "/" , "%" , "*" , "&" , "|" , "^" , "~" , "&&" , "||" , "!" , "E" , "LN10" , "LN2" , "LOG10E" , "LOG2E" , "PI" , "SQRT1_2" , "SQRT2" , "abs" , "acos" , "acosh" , "asin" , "asinh" , "atan" , "atan2" , "atanh" , "cbrt" , "ceil" , "cos" , "cosh" , "exp" , "expm1" , "floor" , "hypot" , "log" , "log10" , "log1p" , "log2" , "max" , "min" , "pow" , "seedrandom" , "random" , "sign" , "sin" , "sinh" , "sqrt" , "tan" , "tanh" , "trunc" , "play" , "pounce" , "dip" , "dip2" , "rotate" , "rollup" , "rolldown" , "if-else" , "ifte" , "=" , "==" , "!=" , ">" , "<" , ">=" , "<=" , "concat" , "cons" , "uncons" , "push" , "pop" , "constrec" , "linrec" , "linrec5" , "binrec" , "times" , "map" , "map2" , "filter" , "reduce" , "split" , "size" , "outAt" , "inAt" , "depth" , "stack-copy" ] ] ) ;
89
+ allPassing &= testIt ( "words" , [ [ "words" , "word" , "dup" , "dup2" , "swap" , "drop" , "round" , "+" , "-" , "/" , "%" , "*" , "&" , "|" , "^" , "~" , "&&" , "||" , "!" , "E" , "LN10" , "LN2" , "LOG10E" , "LOG2E" , "PI" , "SQRT1_2" , "SQRT2" , "abs" , "acos" , "acosh" , "asin" , "asinh" , "atan" , "atan2" , "atanh" , "cbrt" , "ceil" , "cos" , "cosh" , "exp" , "expm1" , "floor" , "hypot" , "log" , "log10" , "log1p" , "log2" , "max" , "min" , "pow" , "seedrandom" , "random" , "sign" , "sin" , "sinh" , "sqrt" , "tan" , "tanh" , "trunc" , "play" , "crouch" , " pounce", "dip" , "dip2" , "rotate" , "rollup" , "rolldown" , "if-else" , "ifte" , "=" , "==" , "!=" , ">" , "<" , ">=" , "<=" , "concat" , "cons" , "uncons" , "push" , "pop" , "constrec" , "linrec" , "linrec5" , "binrec" , "times" , "map" , "map2" , "filter" , "reduce" , "split" , "size" , "outAt" , "inAt" , "depth" , "stack-copy" ] ] ) ;
90
90
allPassing &= testIt ( "[dup2] word" , [ { "sig" :[ [ { "type" :"A" , "use" :"observe" } , { "type" :"B" , "use" :"observe" } ] , [ { "type" :"A" } , { "type" :"B" } , { "type" :"A" } , { "type" :"B" } ] ] , "typeCompose" :"compose" , "compose" :[ [ "dup" ] , "dip" , "dup" , [ "swap" ] , "dip" ] } ] ) ;
91
91
allPassing &= testIt ( "[word] word" , [ { "sig" :[ [ { "type" :"list<string>)" } ] , [ { "type" :"record" } ] ] , "typeCompose" :"compose" } ] ) ;
92
92
allPassing &= testIt ( "497 seedrandom random" , [ 0.5311601270295587 ] ) ;
@@ -250,6 +250,11 @@ allPassing &= testIt(`
250
250
[size 1 <=] [] [uncons [>] split] [concat] binrec
251
251
` , [ [ "a" , "b" , "b" , "c" , "d" , "e" , "f" , "g" , "h" , "j" ] ] ) ;
252
252
253
+ allPassing &= testIt ( "0 0 [a b] [a b +] crouch" , [ [ 0 , 0 , '+' ] ] ) ;
254
+ allPassing &= testIt ( "22 -3 [a b] [a b a + *] crouch" , [ [ 22 , - 3 , 22 , '+' , '*' ] ] ) ;
255
+ allPassing &= testIt ( `0.5 1 [m b] [[x] [m x * b +] pounce] crouch` , [ [ [ 'x' ] , [ 0.5 , 'x' , '*' , 1 , '+' ] , 'pounce' ] ] ) ;
256
+ allPassing &= testIt ( `4 0.5 1 [m b] [[x] [m x * b +] pounce] crouch play` , [ 3 ] ) ;
257
+
253
258
allPassing &= testIt ( "0 0 [a b] [a b +] pounce" , [ 0 ] ) ;
254
259
allPassing &= testIt ( "0 [a] [a] pounce" , [ 0 ] ) ;
255
260
0 commit comments