1 IN: struct-vectors.tests
2 USING: struct-vectors tools.test alien.c-types classes.struct accessors
3 namespaces kernel sequences ;
5 STRUCT: point { x float } { y float } ;
7 : make-point ( x y -- point ) point <struct-boa> ;
9 [ ] [ 1 point <struct-vector> "v" set ] unit-test
12 1.0 2.0 make-point "v" get push
13 3.0 4.5 make-point "v" get push
14 1.5 6.0 make-point "v" get push
15 "v" get pop [ x>> ] [ y>> ] bi