From 675a4207174d0eb3bc149f118beedf02ed5865ca Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Mon, 25 Oct 2010 22:23:03 -0700 Subject: [PATCH] compiler.tests: update for deref --- basis/compiler/tests/intrinsics.factor | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/basis/compiler/tests/intrinsics.factor b/basis/compiler/tests/intrinsics.factor index 74d84e0d89..00345081ca 100644 --- a/basis/compiler/tests/intrinsics.factor +++ b/basis/compiler/tests/intrinsics.factor @@ -467,10 +467,10 @@ ERROR: bug-in-fixnum* x y a b ; [ t ] [ pi double [ { byte-array } declare double deref ] compile-call pi = ] unit-test ! Silly -[ t ] [ pi 4 [ [ { 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 [ [ { 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 [ { byte-array } declare c:float deref ] compile-call pi - -0.001 0.001 between? ] unit-test -[ t ] [ pi 8 [ [ { c:float byte-array } declare 0 set-alien-double ] compile-call ] keep double deref pi = ] unit-test +[ t ] [ pi 8 [ [ { 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 } [ @@ -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* ] 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* ] compile-call ] must-fail [