diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2016-01-25 23:21:13 -0700 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2016-01-25 23:21:13 -0700 |
| commit | a37bb4a4dafa8e3e3b1e9e3bbd07e5cf4eee129b (patch) | |
| tree | d396fefae07b6f48f97990c2cf3c389a4b40025c /test | |
| parent | 01428d4a72c8013e1fe8cfc69eedeb843b1d75c8 (diff) | |
| download | zig-a37bb4a4dafa8e3e3b1e9e3bbd07e5cf4eee129b.tar.gz zig-a37bb4a4dafa8e3e3b1e9e3bbd07e5cf4eee129b.zip | |
add the C integer types
Diffstat (limited to 'test')
| -rw-r--r-- | test/run_tests.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/run_tests.cpp b/test/run_tests.cpp index a25134007f..d02ffbecae 100644 --- a/test/run_tests.cpp +++ b/test/run_tests.cpp @@ -98,10 +98,10 @@ static void add_compiling_test_cases(void) { add_simple_case("hello world with libc", R"SOURCE( #link("c") extern { - fn puts(s: &const u8) -> i32; + fn puts(s: &const u8) -> c_int; } -export fn main(argc: i32, argv: &&u8) -> i32 { +export fn main(argc: c_int, argv: &&u8) -> c_int { puts(c"Hello, world!"); return 0; } @@ -483,10 +483,10 @@ pub fn main(args: [][]u8) -> %void { add_simple_case("number literals", R"SOURCE( #link("c") extern { - fn printf(__format: &const u8, ...) -> i32; + fn printf(__format: &const u8, ...) -> c_int; } -export fn main(argc: i32, argv: &&u8) -> i32 { +export fn main(argc: c_int, argv: &&u8) -> c_int { printf(c"\n"); printf(c"0: %llu\n", |
