From 5d5820029d4ba44cf9e908f56f4bedae25ffe105 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Tue, 6 Mar 2018 16:46:45 -0500 Subject: [PATCH] fix broken tests from previous commit --- test/compare_output.zig | 4 ++-- test/compile_errors.zig | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/compare_output.zig b/test/compare_output.zig index 2ca2ba262e..9595bf8259 100644 --- a/test/compare_output.zig +++ b/test/compare_output.zig @@ -285,8 +285,8 @@ pub fn addCases(cases: &tests.CompareOutputContext) void { \\const c = @cImport(@cInclude("stdlib.h")); \\ \\export fn compare_fn(a: ?&const c_void, b: ?&const c_void) c_int { - \\ const a_int = @ptrCast(&align(1) i32, a ?? unreachable); - \\ const b_int = @ptrCast(&align(1) i32, b ?? unreachable); + \\ const a_int = @ptrCast(&align(1) const i32, a ?? unreachable); + \\ const b_int = @ptrCast(&align(1) const i32, b ?? unreachable); \\ if (*a_int < *b_int) { \\ return -1; \\ } else if (*a_int > *b_int) { diff --git a/test/compile_errors.zig b/test/compile_errors.zig index be2750253c..61234864bb 100644 --- a/test/compile_errors.zig +++ b/test/compile_errors.zig @@ -2440,7 +2440,7 @@ pub fn addCases(cases: &tests.CompileErrorContext) void { \\const Derp = @OpaqueType(); \\extern fn bar(d: &Derp) void; \\export fn foo() void { - \\ const x = u8(1); + \\ var x = u8(1); \\ bar(@ptrCast(&c_void, &x)); \\} ,