aboutsummaryrefslogtreecommitdiff
path: root/test/run_tests.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2016-04-21 15:48:13 -0700
committerAndrew Kelley <superjoe30@gmail.com>2016-04-21 15:48:13 -0700
commit35362f8137b2c5109e6bc39cb12048c016b5b580 (patch)
tree7c0506d8fdb92341cb412ee984288e23c98187b6 /test/run_tests.cpp
parenta380b803ac8b4eefcde4d3d552cdcbc8010aa798 (diff)
downloadzig-35362f8137b2c5109e6bc39cb12048c016b5b580.tar.gz
zig-35362f8137b2c5109e6bc39cb12048c016b5b580.zip
better parsing of C macros
See #88
Diffstat (limited to 'test/run_tests.cpp')
-rw-r--r--test/run_tests.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/run_tests.cpp b/test/run_tests.cpp
index 3e665dbef5..a08b3ea047 100644
--- a/test/run_tests.cpp
+++ b/test/run_tests.cpp
@@ -1390,6 +1390,10 @@ extern void (*fn_ptr)(void);
add_parseh_case("__cdecl doesn't mess up function pointers", R"SOURCE(
void foo(void (__cdecl *fn_ptr)(void));
)SOURCE", 1, "pub extern fn foo(fn_ptr: ?extern fn());");
+
+ add_parseh_case("comment after integer literal", R"SOURCE(
+#define SDL_INIT_VIDEO 0x00000020 /**< SDL_INIT_VIDEO implies SDL_INIT_EVENTS */
+ )SOURCE", 1, "pub const SDL_INIT_VIDEO = 32;");
}
static void run_self_hosted_test(void) {