| ... | ... | @@ -214,7 +214,10 @@ test "allowzero pointer and slice" { |
| 214 | 214 | } |
| 215 | 215 | |
| 216 | 216 | test "assign null directly to C pointer and test null equality" { |
| 217 | | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO |
| 217 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO |
| 218 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 219 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 220 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 218 | 221 | |
| 219 | 222 | var x: [*c]i32 = null; |
| 220 | 223 | try expect(x == null); |
| ... | ... | @@ -238,7 +241,8 @@ test "assign null directly to C pointer and test null equality" { |
| 238 | 241 | @panic("fail"); |
| 239 | 242 | } |
| 240 | 243 | const othery: i32 = undefined; |
| 241 | | comptime try expect((y orelse &othery) == &othery); |
| 244 | const ptr_othery = &othery; |
| 245 | comptime try expect((y orelse ptr_othery) == ptr_othery); |
| 242 | 246 | |
| 243 | 247 | var n: i32 = 1234; |
| 244 | 248 | var x1: [*c]i32 = &n; |