zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit 9b993565510ff210f0351019577b5c9bafbc7462 (tree)
parent f2ca2ace0943a81e0fc5b59347feac177a71eb6c
Author: Sahnvour <sahnvour@pm.me>
Date:   Mon, 11 Mar 2019 21:33:06 +0100

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

Diffstat:
Mtest/translate_c.zig | 6++++++
1 file changed, 6 insertions(+), 0 deletions(-)

diff --git a/test/translate_c.zig b/test/translate_c.zig @@ -1467,6 +1467,12 @@ pub fn addCases(cases: *tests.TranslateCContext) void { "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", // "int a[4] = {};" // ,