update classes.struct tests, and make struct prettyprinting work again
							parent
							
								
									f3768b5361
								
							
						
					
					
						commit
						4cbd4d4b5c
					
				| 
						 | 
				
			
			@ -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 ;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue