1 module ut.transform.type;
2 
3 
4 import ut.transform;
5 import dpp2.transform: toType;
6 import clang: ClangType = Type;
7 
8 alias Kind = ClangType.Kind;
9 
10 
11 @("void")
12 @safe pure unittest {
13     ClangType(Kind.Void).toType.should == Type(Void());
14 }
15 
16 
17 @("nullptr")
18 @safe pure unittest {
19     ClangType(Kind.NullPtr).toType.should == Type(NullPointerT());
20 }
21 
22 
23 @("bool")
24 @safe pure unittest {
25     ClangType(Kind.Bool).toType.should == Type(Bool());
26 }
27 
28 
29 @("wchar")
30 @safe pure unittest {
31     ClangType(Kind.WChar).toType.should == Type(Wchar());
32 }
33 
34 
35 @("schar")
36 @safe pure unittest {
37     ClangType(Kind.SChar).toType.should == Type(SignedChar());
38 }
39 
40 
41 @("char16")
42 @safe pure unittest {
43     ClangType(Kind.Char16).toType.should == Type(Char16());
44 }
45 
46 
47 @("char32")
48 @safe pure unittest {
49     ClangType(Kind.Char32).toType.should == Type(Char32());
50 }
51 
52 
53 @("uchar")
54 @safe pure unittest {
55     ClangType(Kind.UChar).toType.should == Type(UnsignedChar());
56 }
57 
58 
59 @("char_u")
60 @safe pure unittest {
61     ClangType(Kind.Char_U).toType.should == Type(UnsignedChar());
62 }
63 
64 
65 @("char_s")
66 @safe pure unittest {
67     ClangType(Kind.Char_S).toType.should == Type(SignedChar());
68 }
69 
70 
71 @("ushort")
72 @safe pure unittest {
73     ClangType(Kind.UShort).toType.should == Type(UnsignedShort());
74 }
75 
76 
77 @("short")
78 @safe pure unittest {
79     ClangType(Kind.Short).toType.should == Type(Short());
80 }
81 
82 
83 @("int")
84 @safe pure unittest {
85     ClangType(Kind.Int).toType.should == Type(Int());
86 }
87 
88 
89 @("uint")
90 @safe pure unittest {
91     ClangType(Kind.UInt).toType.should == Type(UnsignedInt());
92 }
93 
94 
95 @("long")
96 @safe pure unittest {
97     ClangType(Kind.Long).toType.should == Type(Long());
98 }
99 
100 
101 @("ulong")
102 @safe pure unittest {
103     ClangType(Kind.ULong).toType.should == Type(UnsignedLong());
104 }
105 
106 
107 @("longlong")
108 @safe pure unittest {
109     ClangType(Kind.LongLong).toType.should == Type(LongLong());
110 }
111 
112 
113 @("ulonglong")
114 @safe pure unittest {
115     ClangType(Kind.ULongLong).toType.should == Type(UnsignedLongLong());
116 }
117 
118 
119 @("int128")
120 @safe pure unittest {
121     ClangType(Kind.Int128).toType.should == Type(Int128());
122 }
123 
124 
125 @("uint128")
126 @safe pure unittest {
127     ClangType(Kind.UInt128).toType.should == Type(UnsignedInt128());
128 }
129 
130 
131 @("float")
132 @safe pure unittest {
133     ClangType(Kind.Float).toType.should == Type(Float());
134 }
135 
136 
137 @("double")
138 @safe pure unittest {
139     ClangType(Kind.Double).toType.should == Type(Double());
140 }
141 
142 
143 @("float128")
144 @safe pure unittest {
145     ClangType(Kind.Float128).toType.should == Type(LongDouble());
146 }
147 
148 
149 @("half")
150 @safe pure unittest {
151     ClangType(Kind.Half).toType.should == Type(Half());
152 }
153 
154 
155 @("longdouble")
156 @safe pure unittest {
157     ClangType(Kind.LongDouble).toType.should == Type(LongDouble());
158 }
159 
160 
161 @("record")
162 @safe pure unittest {
163     ClangType(Kind.Record, "mytype").toType.should == Type(UserDefinedType("mytype"));
164 }