PageRenderTime 29ms CodeModel.GetById 10ms app.highlight 17ms RepoModel.GetById 1ms app.codeStats 0ms

/extra/llvm/types/types-tests.factor

http://github.com/abeaumont/factor
Unknown | 40 lines | 34 code | 6 blank | 0 comment | 0 complexity | 989f99bc700c5f9ac3aa5f01b73ccdb0 MD5 | raw file
 1! Copyright (C) 2009 Matthew Willis.
 2! See http://factorcode.org/license.txt for BSD license.
 3USING: kernel llvm.types sequences tools.test ;
 4
 5[ T{ integer f 32 }  ] [ " i32 " parse-type ] unit-test
 6[ float ] [ " float " parse-type ] unit-test
 7[ T{ pointer f f x86_fp80 } ] [ " x86_fp80 * " parse-type ] unit-test
 8[ T{ vector f f 4 T{ integer f 32 } } ] [ " < 4 x i32 > " parse-type ] unit-test
 9[ T{ struct f f { float double } f } ] [ TYPE: { float , double } ; ] unit-test
10[ T{ array f f 0 float } ] [ TYPE: [ 0 x float ] ; ] unit-test
11
12[ label void metadata ]
13[ [ " label " " void " " metadata " ] [ parse-type ] each ] unit-test
14
15[ T{ function f f float { float float } t } ]
16[ TYPE: float ( float , float , ... ) ; ] unit-test
17
18[ T{ struct f f { float TYPE: i32 (i32)* ; } t } ]
19[ TYPE: < { float, i32 (i32)* } > ; ] unit-test
20
21[ t ] [ TYPE: i32 ; TYPE: i32 ; [ >tref ] same? ] unit-test
22[ t ] [ TYPE: i32 * ; TYPE: i32 * ; [ >tref ] same? ] unit-test
23
24[ TYPE: i32 ; ] [ TYPE: i32 ; >tref tref> ] unit-test
25[ TYPE: float ; ] [ TYPE: float ; >tref tref> ] unit-test
26[ TYPE: double ; ] [ TYPE: double ; >tref tref> ] unit-test
27[ TYPE: x86_fp80 ; ] [ TYPE: x86_fp80 ; >tref tref> ] unit-test
28[ TYPE: fp128 ; ] [ TYPE: fp128 ; >tref tref> ] unit-test
29[ TYPE: ppc_fp128 ; ] [ TYPE: ppc_fp128 ; >tref tref> ] unit-test
30[ TYPE: opaque ; ] [ TYPE: opaque ; >tref tref> ] unit-test
31[ TYPE: label ; ] [ TYPE: label ; >tref tref> ] unit-test
32[ TYPE: void ; ] [ TYPE: void ; >tref tref> ] unit-test
33[ TYPE: i32* ; ] [ TYPE: i32* ; >tref tref> ] unit-test
34[ TYPE: < 2 x i32 > ; ] [ TYPE: < 2 x i32 > ; >tref tref> ] unit-test
35[ TYPE: [ 0 x i32 ] ; ] [ TYPE: [ 0 x i32 ] ; >tref tref> ] unit-test
36[ TYPE: { i32, i32 } ; ] [ TYPE: { i32, i32 } ; >tref tref> ] unit-test
37[ TYPE: < { i32, i32 } > ; ] [ TYPE: < { i32, i32 } > ; >tref tref> ] unit-test
38[ TYPE: i32 ( i32 ) ; ] [ TYPE: i32 ( i32 ) ; >tref tref> ] unit-test
39[ TYPE: \1* ; ] [ TYPE: \1* ; >tref tref> ] unit-test
40[ TYPE: { i32, \2* } ; ] [ TYPE: { i32, \2* } ; >tref tref> ] unit-test