PageRenderTime 16ms CodeModel.GetById 1ms app.highlight 13ms RepoModel.GetById 1ms app.codeStats 0ms

/trunk/Examples/test-suite/d/preproc_constants_runme.1.d

#
D | 63 lines | 58 code | 4 blank | 1 comment | 53 complexity | 460d11a1cdadad424acaeaec8e11b5bc MD5 | raw file
 1module preproc_constants_runme;
 2
 3import tango.stdc.config;
 4import preproc_constants.preproc_constants;
 5
 6void main() {
 7  static assert(is(int == typeof(CONST_INT1())));
 8  static assert(is(int == typeof(CONST_INT2())));
 9  static assert(is(uint == typeof(CONST_UINT1())));
10  static assert(is(uint == typeof(CONST_UINT2())));
11  static assert(is(uint == typeof(CONST_UINT3())));
12  static assert(is(uint == typeof(CONST_UINT4())));
13  static assert(is(c_long == typeof(CONST_LONG1())));
14  static assert(is(c_long == typeof(CONST_LONG2())));
15  static assert(is(c_long == typeof(CONST_LONG3())));
16  static assert(is(c_long == typeof(CONST_LONG4())));
17  static assert(is(long == typeof(CONST_LLONG1())));
18  static assert(is(long == typeof(CONST_LLONG2())));
19  static assert(is(long == typeof(CONST_LLONG3())));
20  static assert(is(long == typeof(CONST_LLONG4())));
21  static assert(is(ulong == typeof(CONST_ULLONG1())));
22  static assert(is(ulong == typeof(CONST_ULLONG2())));
23  static assert(is(ulong == typeof(CONST_ULLONG3())));
24  static assert(is(ulong == typeof(CONST_ULLONG4())));
25  static assert(is(double == typeof(CONST_DOUBLE1())));
26  static assert(is(double == typeof(CONST_DOUBLE2())));
27  static assert(is(double == typeof(CONST_DOUBLE3())));
28  static assert(is(double == typeof(CONST_DOUBLE4())));
29  static assert(is(double == typeof(CONST_DOUBLE5())));
30  static assert(is(double == typeof(CONST_DOUBLE6())));
31  static assert(is(bool == typeof(CONST_BOOL1())));
32  static assert(is(bool == typeof(CONST_BOOL2())));
33  static assert(is(char == typeof(CONST_CHAR())));
34  static assert(is(char[] == typeof(CONST_STRING1())));
35  static assert(is(char[] == typeof(CONST_STRING2())));
36
37  static assert(is(int == typeof(INT_AND_BOOL())));
38//    static assert(is(int == typeof(INT_AND_CHAR())));
39  static assert(is(int == typeof(INT_AND_INT())));
40  static assert(is(uint == typeof(INT_AND_UINT())));
41  static assert(is(c_long == typeof(INT_AND_LONG())));
42  static assert(is(c_ulong == typeof(INT_AND_ULONG())));
43  static assert(is(long == typeof(INT_AND_LLONG())));
44  static assert(is(ulong == typeof(INT_AND_ULLONG())));
45  static assert(is(int == typeof(BOOL_AND_BOOL())));
46
47  static assert(is(int == typeof(EXPR_MULTIPLY())));
48  static assert(is(int == typeof(EXPR_DIVIDE())));
49  static assert(is(int == typeof(EXPR_PLUS())));
50  static assert(is(int == typeof(EXPR_MINUS())));
51  static assert(is(int == typeof(EXPR_LSHIFT())));
52  static assert(is(int == typeof(EXPR_RSHIFT())));
53  static assert(is(bool == typeof(EXPR_LTE())));
54  static assert(is(bool == typeof(EXPR_GTE())));
55  static assert(is(bool == typeof(EXPR_INEQUALITY())));
56  static assert(is(bool == typeof(EXPR_EQUALITY())));
57  static assert(is(int == typeof(EXPR_AND())));
58  static assert(is(int == typeof(EXPR_XOR())));
59  static assert(is(int == typeof(EXPR_OR())));
60  static assert(is(bool == typeof(EXPR_LAND())));
61  static assert(is(bool == typeof(EXPR_LOR())));
62  static assert(is(double == typeof(EXPR_CONDITIONAL())));
63}