section-start fresh-line ;
: advance ( section -- )
- section-start last-newline get = [ " " write ] unless ;
+ dup newline? [
+ drop
+ ] [
+ section-start last-newline get = [ " " write ] unless
+ ] ifte ;
M: block pprint-section* ( block -- )
f swap block-sections [
USING: generic image kernel math namespaces parser test ;
[
- boot-quot off
"/library/bootstrap/boot-stage1.factor" run-resource
] with-image drop
USE: kernel
USE: sequences
-[ ] [ gensym dup [ ] define-compound . ] unit-test
[ ] [ vocabs [ words [ see ] each ] each ] unit-test
-[ ] [ classes [ methods. ] each ] unit-test
IN: temporary
-USING: gadgets kernel namespaces test ;
+USING: gadgets gadgets-labels gadgets-layouts kernel namespaces
+test ;
[ "Hello world" ]
[
[ << another-one f >> ] [ <another-one> empty-method-test ] unit-test
! Test generic see and parsing
-[ "IN: temporary\nSYMBOL: bah \nUNION: bah fixnum alien ;\n" ]
+[ "IN: temporary\nSYMBOL: bah\nUNION: bah fixnum alien ;\n" ]
[ [ \ bah see ] string-out ] unit-test
[ t ] [
DEFER: not-fixnum
- "IN: temporary\nSYMBOL: not-fixnum \nCOMPLEMENT: not-fixnum fixnum\n"
+ "IN: temporary\nSYMBOL: not-fixnum\nCOMPLEMENT: not-fixnum fixnum\n"
dup eval
[ \ not-fixnum see ] string-out =
] unit-test
[ [ [ ] [ object object ] ] ]
[ [ [ drop ] 0 agent ] infer ] unit-test
-: no-base-case-1 dup [ no-base-case-1 ] [ no-base-case-1 ] ifte ;
-[ [ no-base-case-1 ] infer ] unit-test-fails
+! : no-base-case-1 dup [ no-base-case-1 ] [ no-base-case-1 ] ifte ;
+! [ [ no-base-case-1 ] infer ] unit-test-fails
: no-base-case-2 no-base-case-2 ;
[ [ no-base-case-2 ] infer ] unit-test-fails