translate-c: additional test case for integer suffixes on 0

master
Sahnvour 2019-03-11 21:33:06 +01:00 committed by Andrew Kelley
parent f2ca2ace09
commit 9b99356551
1 changed files with 6 additions and 0 deletions

View File

@ -1467,6 +1467,12 @@ pub fn addCases(cases: *tests.TranslateCContext) void {
"pub const ZERO = c_ulonglong(0);" "pub const ZERO = c_ulonglong(0);"
); );
cases.addC("bitwise not on u-suffixed 0 (zero) in macro definition",
"#define NOT_ZERO (~0U)"
,
"pub const NOT_ZERO = ~c_uint(0);"
);
// cases.add("empty array with initializer", // cases.add("empty array with initializer",
// "int a[4] = {};" // "int a[4] = {};"
// , // ,