diff --git a/basis/compiler/tests/codegen.factor b/basis/compiler/tests/codegen.factor index a56ee55c82..dd6f99ead1 100644 --- a/basis/compiler/tests/codegen.factor +++ b/basis/compiler/tests/codegen.factor @@ -3,7 +3,7 @@ kernel.private math hashtables.private math.private namespaces sequences sequences.private tools.test namespaces.private slots.private sequences.private byte-arrays alien alien.accessors layouts words definitions compiler.units io -combinators vectors float-arrays ; +combinators vectors float-arrays grouping make ; IN: compiler.tests ! Originally, this file did black box testing of templating @@ -241,3 +241,16 @@ TUPLE: id obj ; [ "a" ] [ 1 test-2 ] unit-test [ "b" ] [ 2 test-2 ] unit-test + +! I accidentally fixnum/i-fast on PowerPC +[ { { 1 2 } { 3 4 } } ] [ + { 1 2 3 4 } + [ + [ { array } declare 2 [ , ] each ] compile-call + ] { } make +] unit-test + +[ 2 ] [ + { 1 2 3 4 } + [ { array } declare 2 length ] compile-call +] unit-test diff --git a/basis/compiler/tests/intrinsics.factor b/basis/compiler/tests/intrinsics.factor index c90a31fc61..3c4741272d 100644 --- a/basis/compiler/tests/intrinsics.factor +++ b/basis/compiler/tests/intrinsics.factor @@ -160,6 +160,11 @@ IN: compiler.tests [ -2 ] [ 4 [ -2 fixnum/i ] compile-call ] unit-test [ 3 1 ] [ 10 3 [ fixnum/mod ] compile-call ] unit-test +[ 2 ] [ 4 2 [ fixnum/i-fast ] compile-call ] unit-test +[ 2 ] [ 4 [ 2 fixnum/i-fast ] compile-call ] unit-test +[ -2 ] [ 4 [ -2 fixnum/i-fast ] compile-call ] unit-test +[ 3 1 ] [ 10 3 [ fixnum/mod-fast ] compile-call ] unit-test + [ 4 ] [ 1 3 [ fixnum+ ] compile-call ] unit-test [ 4 ] [ 1 [ 3 fixnum+ ] compile-call ] unit-test [ 4 ] [ [ 1 3 fixnum+ ] compile-call ] unit-test