update classes.struct tests, and make struct prettyprinting work again

db4
Joe Groff 2009-08-31 20:46:33 -05:00
parent f3768b5361
commit 4cbd4d4b5c
2 changed files with 7 additions and 2 deletions

View File

@ -27,7 +27,12 @@ IN: classes.struct.prettyprint
\ } pprint-word block> ;
: pprint-struct ( struct -- )
[ [ \ S{ ] dip [ class ] [ struct>assoc ] bi \ } (pprint-tuple) ] ?pprint-tuple ;
[
[ \ S{ ] dip
[ class ]
[ struct>assoc [ [ name>> ] dip ] assoc-map ] bi
\ } (pprint-tuple)
] ?pprint-tuple ;
: pprint-struct-pointer ( struct -- )
\ S@ [ [ class pprint-word ] [ >c-ptr pprint* ] bi ] pprint-prefix ;

View File

@ -76,7 +76,7 @@ STRUCT: struct-test-string-ptr
] with-destructors
] unit-test
[ "S{ struct-test-foo { y 7654 } }" ]
[ "S{ struct-test-foo { x 0 } { y 7654 } { z f } }" ]
[
[
boa-tuples? off