| ... | ... | @@ -216,7 +216,7 @@ pub fn addCases(cases: &tests.ParseHContext) { |
| 216 | 216 | cases.add("#define string", |
| 217 | 217 | \\#define foo "a string" |
| 218 | 218 | , |
| 219 | | \\pub const foo: &const u8 = &(c str lit); |
| 219 | \\pub const foo = c"a string"; |
| 220 | 220 | ); |
| 221 | 221 | |
| 222 | 222 | cases.add("__cdecl doesn't mess up function pointers", |
| ... | ... | @@ -234,43 +234,43 @@ pub fn addCases(cases: &tests.ParseHContext) { |
| 234 | 234 | cases.add("u integer suffix after hex literal", |
| 235 | 235 | \\#define SDL_INIT_VIDEO 0x00000020u /**< SDL_INIT_VIDEO implies SDL_INIT_EVENTS */ |
| 236 | 236 | , |
| 237 | | \\pub const SDL_INIT_VIDEO: c_uint = 32; |
| 237 | \\pub const SDL_INIT_VIDEO = c_uint(32); |
| 238 | 238 | ); |
| 239 | 239 | |
| 240 | 240 | cases.add("l integer suffix after hex literal", |
| 241 | 241 | \\#define SDL_INIT_VIDEO 0x00000020l /**< SDL_INIT_VIDEO implies SDL_INIT_EVENTS */ |
| 242 | 242 | , |
| 243 | | \\pub const SDL_INIT_VIDEO: c_long = 32; |
| 243 | \\pub const SDL_INIT_VIDEO = c_long(32); |
| 244 | 244 | ); |
| 245 | 245 | |
| 246 | 246 | cases.add("ul integer suffix after hex literal", |
| 247 | 247 | \\#define SDL_INIT_VIDEO 0x00000020ul /**< SDL_INIT_VIDEO implies SDL_INIT_EVENTS */ |
| 248 | 248 | , |
| 249 | | \\pub const SDL_INIT_VIDEO: c_ulong = 32; |
| 249 | \\pub const SDL_INIT_VIDEO = c_ulong(32); |
| 250 | 250 | ); |
| 251 | 251 | |
| 252 | 252 | cases.add("lu integer suffix after hex literal", |
| 253 | 253 | \\#define SDL_INIT_VIDEO 0x00000020lu /**< SDL_INIT_VIDEO implies SDL_INIT_EVENTS */ |
| 254 | 254 | , |
| 255 | | \\pub const SDL_INIT_VIDEO: c_ulong = 32; |
| 255 | \\pub const SDL_INIT_VIDEO = c_ulong(32); |
| 256 | 256 | ); |
| 257 | 257 | |
| 258 | 258 | cases.add("ll integer suffix after hex literal", |
| 259 | 259 | \\#define SDL_INIT_VIDEO 0x00000020ll /**< SDL_INIT_VIDEO implies SDL_INIT_EVENTS */ |
| 260 | 260 | , |
| 261 | | \\pub const SDL_INIT_VIDEO: c_longlong = 32; |
| 261 | \\pub const SDL_INIT_VIDEO = c_longlong(32); |
| 262 | 262 | ); |
| 263 | 263 | |
| 264 | 264 | cases.add("ull integer suffix after hex literal", |
| 265 | 265 | \\#define SDL_INIT_VIDEO 0x00000020ull /**< SDL_INIT_VIDEO implies SDL_INIT_EVENTS */ |
| 266 | 266 | , |
| 267 | | \\pub const SDL_INIT_VIDEO: c_ulonglong = 32; |
| 267 | \\pub const SDL_INIT_VIDEO = c_ulonglong(32); |
| 268 | 268 | ); |
| 269 | 269 | |
| 270 | 270 | cases.add("llu integer suffix after hex literal", |
| 271 | 271 | \\#define SDL_INIT_VIDEO 0x00000020llu /**< SDL_INIT_VIDEO implies SDL_INIT_EVENTS */ |
| 272 | 272 | , |
| 273 | | \\pub const SDL_INIT_VIDEO: c_ulonglong = 32; |
| 273 | \\pub const SDL_INIT_VIDEO = c_ulonglong(32); |
| 274 | 274 | ); |
| 275 | 275 | |
| 276 | 276 | cases.add("zig keywords in C code", |
| ... | ... | @@ -290,9 +290,9 @@ pub fn addCases(cases: &tests.ParseHContext) { |
| 290 | 290 | \\#define FOO2 "aoeu\0234 derp" |
| 291 | 291 | \\#define FOO_CHAR '\077' |
| 292 | 292 | , |
| 293 | | \\pub const FOO: &const u8 = &(c str lit); |
| 293 | \\pub const FOO = c"aoeu\x13 derp"; |
| 294 | 294 | , |
| 295 | | \\pub const FOO2: &const u8 = &(c str lit); |
| 295 | \\pub const FOO2 = c"aoeu\x134 derp"; |
| 296 | 296 | , |
| 297 | 297 | \\pub const FOO_CHAR = 63; |
| 298 | 298 | ); |