]> gitweb.factorcode.org Git - factor.git/commitdiff
compiler: more tests
authorSlava Pestov <slava@factorcode.org>
Tue, 4 May 2010 10:46:45 +0000 (05:46 -0500)
committerSlava Pestov <slava@factorcode.org>
Tue, 4 May 2010 10:46:45 +0000 (05:46 -0500)
basis/compiler/tests/float.factor

index d55fe2b76945289513e539053b972ad120770846..968587093696d1e19ad3c5ef96e16bf4751fccea 100644 (file)
@@ -121,3 +121,13 @@ IN: compiler.tests.float
     float-array{ 1 2 3 4 }
     [ { float-array } declare [ dup * ] [ + ] map-reduce ] compile-call
 ] unit-test
+
+[ 4.5 ] [
+    float-array{ 1.0 3.5 }
+    [ { float-array } declare 0.0 [ + ] reduce ] compile-call
+] unit-test
+
+[ float-array{ 2.0 4.5 } ] [
+    float-array{ 1.0 3.5 }
+    [ { float-array } declare [ 1 + ] map ] compile-call
+] unit-test