From c1d249afb28f9df3ed828d7b475f025de03e9b29 Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Sat, 29 Nov 2008 00:37:07 -0600 Subject: [PATCH] Add unit test --- basis/compiler/tests/codegen.factor | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/basis/compiler/tests/codegen.factor b/basis/compiler/tests/codegen.factor index dd6f99ead1..eb818972fc 100644 --- a/basis/compiler/tests/codegen.factor +++ b/basis/compiler/tests/codegen.factor @@ -254,3 +254,10 @@ TUPLE: id obj ; { 1 2 3 4 } [ { array } declare 2 length ] compile-call ] unit-test + +! Oops with new intrinsics +: fixnum-overflow-control-flow-test ( a b -- c ) + [ 1 fixnum- ] [ 2 fixnum- ] if 3 fixnum+fast ; + +[ 3 ] [ 1 t fixnum-overflow-control-flow-test ] unit-test +[ 2 ] [ 1 f fixnum-overflow-control-flow-test ] unit-test