authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-04-07 16:05:42-04:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-04-07 16:05:42-04:00
loged23dad4877cd93fd684852b17e0e554ef71e297
tree8c5cddda93e5910d46cccb45a1d3c6c811022f5d
parent4d290758bb3145f65840ad0ac244fc4388bde9e0
signaturelock-open Commit is signed but in an unrecognized format.

fix the new runtime-safety tests

Thanks to Vexu's work in e62671f643, compile errors were identified in these test cases! This commit fixes them to use `const` as appropriate.

1 files changed, 2 insertions(+), 2 deletions(-)

test/runtime_safety.zig+2-2
......@@ -56,7 +56,7 @@ pub fn addCases(cases: *tests.CompareOutputContext) void {
5656 \\const std = @import("std");
5757 ++ check_panic_msg ++
5858 \\pub fn main() void {
59 \\ var buf_slice: []u8 = &[3]u8{ 'a', 'b', 0 };
59 \\ var buf_slice: []const u8 = &[3]u8{ 'a', 'b', 0 };
6060 \\ const slice = buf_slice[0..3 :0];
6161 \\}
6262 );
......@@ -64,7 +64,7 @@ pub fn addCases(cases: *tests.CompareOutputContext) void {
6464 \\const std = @import("std");
6565 ++ check_panic_msg ++
6666 \\pub fn main() void {
67 \\ var buf_slice: []u8 = &[3]u8{ 'a', 'b', 0 };
67 \\ var buf_slice: []const u8 = &[3]u8{ 'a', 'b', 0 };
6868 \\ const slice = buf_slice[0.. :0];
6969 \\}
7070 );