]> gitweb.factorcode.org Git - factor.git/blob - basis/alien/complex/complex-tests.factor
classes.struct: moving to new/boa instead of <struct>/<struct-boa>
[factor.git] / basis / alien / complex / complex-tests.factor
1 ! Copyright (C) 2009 Slava Pestov.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: accessors alien.c-types alien.complex classes.struct math
4 namespaces tools.test ;
5 IN: alien.complex.tests
6
7 STRUCT: complex-holder
8     { z complex-float } ;
9
10 C: <complex-holder> complex-holder
11
12 { } [
13     C{ 1.0 2.0 } <complex-holder> "h" set
14 ] unit-test
15
16 { C{ 1.0 2.0 } } [ "h" get z>> ] unit-test
17
18 { complex } [ complex-float c-type-boxed-class ] unit-test
19
20 { complex } [ complex-double c-type-boxed-class ] unit-test