diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2019-11-19 20:29:08 -0500 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2019-11-21 20:43:41 -0500 |
| commit | 47f06be36943f808aa9798c19172363afe6ae35c (patch) | |
| tree | 79ede48ae2cbbbbe2e2489b2733df4e907bfe968 /test/stage2 | |
| parent | 21f344b3b903b41fd4793faa82a4ac26ad2544aa (diff) | |
| download | zig-47f06be36943f808aa9798c19172363afe6ae35c.tar.gz zig-47f06be36943f808aa9798c19172363afe6ae35c.zip | |
string literals are now null terminated
this also deletes C string literals from the language, and then makes
the std lib changes and compiler changes necessary to get the behavior
tests and std lib tests passing again.
Diffstat (limited to 'test/stage2')
| -rw-r--r-- | test/stage2/compare_output.zig | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/stage2/compare_output.zig b/test/stage2/compare_output.zig index fdc3d49145..a86811b27b 100644 --- a/test/stage2/compare_output.zig +++ b/test/stage2/compare_output.zig @@ -6,7 +6,7 @@ pub fn addCases(ctx: *TestContext) !void { try ctx.testCompareOutputLibC( \\extern fn puts([*]const u8) void; \\export fn main() c_int { - \\ puts(c"Hello, world!"); + \\ puts("Hello, world!"); \\ return 0; \\} , "Hello, world!" ++ std.cstr.line_sep); @@ -15,7 +15,7 @@ pub fn addCases(ctx: *TestContext) !void { try ctx.testCompareOutputLibC( \\extern fn puts(s: [*]const u8) void; \\export fn main() c_int { - \\ return foo(c"OK"); + \\ return foo("OK"); \\} \\fn foo(s: [*]const u8) c_int { \\ puts(s); |
