authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2017-09-05 00:52:05-04:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2017-09-05 00:52:05-04:00
logf6c271f8ebb990eafb598acf8d9ced1e7ade42db
treee6e3bb9d9479e496369bd7f1343091c848c21061
parentb64843bf702dcae9fc6a7f3570282a4ddf10af56

parseh tests passing


1 files changed, 10 insertions(+), 10 deletions(-)

test/parseh.zig+10-10
......@@ -216,7 +216,7 @@ pub fn addCases(cases: &tests.ParseHContext) {
216216 cases.add("#define string",
217217 \\#define foo "a string"
218218 ,
219 \\pub const foo: &const u8 = &(c str lit);
219 \\pub const foo = c"a string";
220220 );
221221
222222 cases.add("__cdecl doesn't mess up function pointers",
......@@ -234,43 +234,43 @@ pub fn addCases(cases: &tests.ParseHContext) {
234234 cases.add("u integer suffix after hex literal",
235235 \\#define SDL_INIT_VIDEO 0x00000020u /**< SDL_INIT_VIDEO implies SDL_INIT_EVENTS */
236236 ,
237 \\pub const SDL_INIT_VIDEO: c_uint = 32;
237 \\pub const SDL_INIT_VIDEO = c_uint(32);
238238 );
239239
240240 cases.add("l integer suffix after hex literal",
241241 \\#define SDL_INIT_VIDEO 0x00000020l /**< SDL_INIT_VIDEO implies SDL_INIT_EVENTS */
242242 ,
243 \\pub const SDL_INIT_VIDEO: c_long = 32;
243 \\pub const SDL_INIT_VIDEO = c_long(32);
244244 );
245245
246246 cases.add("ul integer suffix after hex literal",
247247 \\#define SDL_INIT_VIDEO 0x00000020ul /**< SDL_INIT_VIDEO implies SDL_INIT_EVENTS */
248248 ,
249 \\pub const SDL_INIT_VIDEO: c_ulong = 32;
249 \\pub const SDL_INIT_VIDEO = c_ulong(32);
250250 );
251251
252252 cases.add("lu integer suffix after hex literal",
253253 \\#define SDL_INIT_VIDEO 0x00000020lu /**< SDL_INIT_VIDEO implies SDL_INIT_EVENTS */
254254 ,
255 \\pub const SDL_INIT_VIDEO: c_ulong = 32;
255 \\pub const SDL_INIT_VIDEO = c_ulong(32);
256256 );
257257
258258 cases.add("ll integer suffix after hex literal",
259259 \\#define SDL_INIT_VIDEO 0x00000020ll /**< SDL_INIT_VIDEO implies SDL_INIT_EVENTS */
260260 ,
261 \\pub const SDL_INIT_VIDEO: c_longlong = 32;
261 \\pub const SDL_INIT_VIDEO = c_longlong(32);
262262 );
263263
264264 cases.add("ull integer suffix after hex literal",
265265 \\#define SDL_INIT_VIDEO 0x00000020ull /**< SDL_INIT_VIDEO implies SDL_INIT_EVENTS */
266266 ,
267 \\pub const SDL_INIT_VIDEO: c_ulonglong = 32;
267 \\pub const SDL_INIT_VIDEO = c_ulonglong(32);
268268 );
269269
270270 cases.add("llu integer suffix after hex literal",
271271 \\#define SDL_INIT_VIDEO 0x00000020llu /**< SDL_INIT_VIDEO implies SDL_INIT_EVENTS */
272272 ,
273 \\pub const SDL_INIT_VIDEO: c_ulonglong = 32;
273 \\pub const SDL_INIT_VIDEO = c_ulonglong(32);
274274 );
275275
276276 cases.add("zig keywords in C code",
......@@ -290,9 +290,9 @@ pub fn addCases(cases: &tests.ParseHContext) {
290290 \\#define FOO2 "aoeu\0234 derp"
291291 \\#define FOO_CHAR '\077'
292292 ,
293 \\pub const FOO: &const u8 = &(c str lit);
293 \\pub const FOO = c"aoeu\x13 derp";
294294 ,
295 \\pub const FOO2: &const u8 = &(c str lit);
295 \\pub const FOO2 = c"aoeu\x134 derp";
296296 ,
297297 \\pub const FOO_CHAR = 63;
298298 );