]> gitweb.factorcode.org Git - factor.git/commitdiff
typed: .97 basically breaks typed. Check that the new behavior is enforced.
authorDoug Coleman <doug.coleman@gmail.com>
Thu, 3 Jul 2014 19:29:40 +0000 (12:29 -0700)
committerDoug Coleman <doug.coleman@gmail.com>
Thu, 3 Jul 2014 19:29:40 +0000 (12:29 -0700)
basis/typed/typed-tests.factor

index 433ac3b5bfe3f16e727a053f9e6b834fbadb0135..2c255e388cf0815b2f8b2ba71722b613651f667a 100644 (file)
@@ -13,8 +13,12 @@ TYPED: f+ ( a: float b: float -- c: float )
 TYPED: fix+ ( a: fixnum b: fixnum -- c: fixnum )
     + ;
 
-most-positive-fixnum neg 1 - 1quotation
-[ most-positive-fixnum 1 fix+ ] unit-test
+! XXX: As of .97, we don't require that the output is a fixnum.
+! most-positive-fixnum neg 1 - 1quotation
+! [ most-positive-fixnum 1 fix+ ] unit-test
+
+! XXX: Check that we throw an error. This used to underflow to the least-positive-fixnum.
+[ most-positive-fixnum 1 fix+ ] [ { "kernel-error" 7 } head? ] must-fail-with
 
 TUPLE: tweedle-dee ; final
 TUPLE: tweedle-dum ; final