"predicate" word-prop [ dupd call assure ] curry ;
: slot-readers ( class -- quot )
- all-slots [ name>> reader-word 1quotation ] map [ cleave ] curry ;
+ class-slots [ name>> reader-word 1quotation ] map [ cleave ] curry ;
: ?wrapped ( object -- wrapped )
dup wrapper? [ wrapped>> ] when ;
USING: accessors alien.c-types classes.c-types classes.struct
-combinators kernel tools.test ;
+combinators inverse kernel tools.test ;
IN: classes.struct.tests
STRUCT: foo
[ 7654 ] [ S{ foo f 98 7654 f } y>> ] unit-test
[ 7654 ] [ S{ foo { y 7654 } } y>> ] unit-test
+
+[ 98 7654 t ] [ S{ foo f 98 7654 t } [ foo boa ] undo ] unit-test