2 USING: math accessors slots strings generic.standard kernel tools.test ;
6 TUPLE: r/o-test { "foo" read-only: t } ;
8 [ r/o-test new 123 >>foo ] [ no-method? ] must-fail-with
10 TUPLE: decl-test { "foo" integer } ;
12 [ decl-test new 1.0 >>foo ] [ bad-slot-value? ] must-fail-with
16 [ 3 ] [ "xyz" length>> ] unit-test
18 [ "xyz" 4 >>length ] [ no-method? ] must-fail-with