]> gitweb.factorcode.org Git - factor.git/commitdiff
compiler.tests: update for <ref> deref
authorSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Tue, 26 Oct 2010 05:23:03 +0000 (22:23 -0700)
committerSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Tue, 26 Oct 2010 05:23:03 +0000 (22:23 -0700)
basis/compiler/tests/intrinsics.factor

index 74d84e0d8986718c3a8622c593f312050e408f3b..00345081caaa9c24fcd670f80b72ec92e8530334 100644 (file)
@@ -467,10 +467,10 @@ ERROR: bug-in-fixnum* x y a b ;
 [ t ] [ pi double <ref> [ { byte-array } declare double deref ] compile-call pi = ] unit-test
 
 ! Silly
-[ t ] [ pi 4 <byte-array> [ [ { c:float byte-array } declare 0 set-alien-float ] compile-call ] keep c:float deref pi - -0.001 0.001 between? ] unit-test
+[ t ] [ pi 4 <byte-array> [ [ { float byte-array } declare 0 set-alien-float ] compile-call ] keep c:float deref pi - -0.001 0.001 between? ] unit-test
 [ t ] [ pi c:float <ref> [ { byte-array } declare c:float deref ] compile-call pi - -0.001 0.001 between? ] unit-test
 
-[ t ] [ pi 8 <byte-array> [ [ { c:float byte-array } declare 0 set-alien-double ] compile-call ] keep double deref pi = ] unit-test
+[ t ] [ pi 8 <byte-array> [ [ { float byte-array } declare 0 set-alien-double ] compile-call ] keep double deref pi = ] unit-test
 
 [ 4 ] [
     2 B{ 1 2 3 4 5 6 } <displaced-alien> [
@@ -534,12 +534,14 @@ ERROR: bug-in-fixnum* x y a b ;
     ] compile-call
 ] unit-test
 
+! These tests must fail because we're not allowed to store
+! a pointer to a byte array inside of an alien object
 [
-    B{ 0 0 0 0 } [ { byte-array } declare void* deref ] compile-call
+    B{ 0 0 0 0 } [ { byte-array } declare void* <ref> ] compile-call
 ] must-fail
 
 [
-    B{ 0 0 0 0 } [ { c-ptr } declare void* deref ] compile-call
+    B{ 0 0 0 0 } [ { c-ptr } declare void* <ref> ] compile-call
 ] must-fail
 
 [