From cc419c9814281cac9d046f1068c33ec868ec6c8a Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Fri, 3 Jun 2016 20:51:02 -0700 Subject: [PATCH] factor: more syntax bugs fixed. --- language/compiler/tests/alien.factor | 12 ++++++------ language/compiler/tests/redefine0.factor | 8 ++++---- language/compiler/tests/redefine16.factor | 8 ++++---- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/language/compiler/tests/alien.factor b/language/compiler/tests/alien.factor index ced71c51d7..6aac76da86 100755 --- a/language/compiler/tests/alien.factor +++ b/language/compiler/tests/alien.factor @@ -172,7 +172,7 @@ FUNCTION: int ffi_test_10 ( int a, int b, double c, int d, float e, int f, int g FUNCTION: void ffi_test_20 ( double x1, double x2, double x3, double y1, double y2, double y3, - double z1, double z2, double z3 ) + double z1, double z2, double z3 ) ; [ ] [ 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 ffi_test_20 ] unit-test @@ -585,15 +585,15 @@ FUNCTION: test_struct_14 ffi_test_44 ( ) ; inline ! C99 tests os windows? [ - FUNCTION: complex-float ffi_test_45 ( int x ) + FUNCTION: complex-float ffi_test_45 ( int x ) ; [ C{ 3.0 0.0 } ] [ 3 ffi_test_45 ] unit-test - FUNCTION: complex-double ffi_test_46 ( int x ) + FUNCTION: complex-double ffi_test_46 ( int x ) ; [ C{ 3.0 0.0 } ] [ 3 ffi_test_46 ] unit-test - FUNCTION: complex-float ffi_test_47 ( complex-float x, complex-double y ) + FUNCTION: complex-float ffi_test_47 ( complex-float x, complex-double y ) ; [ C{ 4.0 4.0 } ] [ C{ 1.0 2.0 } @@ -606,7 +606,7 @@ os windows? [ { on bool } { parents short } ; - FUNCTION: short ffi_test_48 ( bool-field-test x ) + FUNCTION: short ffi_test_48 ( bool-field-test x ) ; [ 123 ] [ bool-field-test @@ -874,7 +874,7 @@ os windows? [ { b bool } { ptr void* } ; - FUNCTION: bool-and-ptr ffi_test_61 ( ) + FUNCTION: bool-and-ptr ffi_test_61 ( ) ; ! { S{ bool-and-ptr { b t } { ptr f } } } [ ffi_test_61 ] unit-test { t } [ ffi_test_61 bool-and-ptr? ] unit-test diff --git a/language/compiler/tests/redefine0.factor b/language/compiler/tests/redefine0.factor index 714f81d7bc..4a9cb8110f 100644 --- a/language/compiler/tests/redefine0.factor +++ b/language/compiler/tests/redefine0.factor @@ -1,5 +1,5 @@ -USING: tools.test eval compiler compiler.errors compiler.units definitions kernel math -namespaces macros assocs ; +USING: tools.test eval compiler compiler.errors compiler.units definitions +kernel math namespaces macros assocs ; IN: compiler.tests.redefine0 ! Test ripple-up behavior @@ -62,7 +62,7 @@ M: integer test-7 + ; [ 1 test-7 ] [ not-compiled? ] must-fail-with [ 1 test-8 ] [ not-compiled? ] must-fail-with -[ ] [ "IN: compiler.tests.redefine0 USING: macros math kernel ; GENERIC: test-7 ( x y -- z ) : test-8 ( a b -- c ) 255 bitand test-7 ;" eval( -- ) ; ] unit-test +[ ] [ "in: compiler.tests.redefine0 USING: macros math kernel ; GENERIC: test-7 ( x y -- z ) ; : test-8 ( a b -- c ) 255 bitand test-7 ;" eval( -- ) ] unit-test [ 4 ] [ 1 3 test-7 ] unit-test [ 4 ] [ 1 259 test-8 ] unit-test @@ -76,7 +76,7 @@ M: integer test-7 + ; ! Indirect dependency on an unoptimized word : test-9 ( -- ) ; -<< SYMBOL: quot +<< symbol: quot [ test-9 ] quot set-global MACRO: test-10 ( -- quot ) quot get ; >> : test-11 ( -- ) test-10 ; diff --git a/language/compiler/tests/redefine16.factor b/language/compiler/tests/redefine16.factor index 9bf1de3e32..ad2ecf19a9 100644 --- a/language/compiler/tests/redefine16.factor +++ b/language/compiler/tests/redefine16.factor @@ -1,11 +1,11 @@ USING: eval tools.test definitions words compiler.units quotations stack-checker ; -IN: compiler.tests.redefine16 +in: compiler.tests.redefine16 [ ] [ [ "blah" "compiler.tests.redefine16" lookup-word forget ] with-compilation-unit ] unit-test -[ ] [ "IN: compiler.tests.redefine16 GENERIC# blah 2 ( foo bar baz -- )" eval( -- ) ] unit-test -[ ] [ "IN: compiler.tests.redefine16 USING: strings math arrays prettyprint ; M: string blah 1 + 3array . ;" eval( -- ) ] unit-test -[ ] [ "IN: compiler.tests.redefine16 GENERIC# blah 2 ( foo bar baz -- x )" eval( -- ) ] unit-test +[ ] [ "in: compiler.tests.redefine16 GENERIC# blah 2 ( foo bar baz -- ) ;" eval( -- ) ] unit-test +[ ] [ "in: compiler.tests.redefine16 USING: strings math arrays prettyprint ; M: string blah 1 + 3array . ;" eval( -- ) ] unit-test +[ ] [ "in: compiler.tests.redefine16 GENERIC# blah 2 ( foo bar baz -- x ) ;" eval( -- ) ] unit-test [ ] [ [ "blah" "compiler.tests.redefine16" lookup-word forget ] with-compilation-unit ] unit-test