| author | |
| committer | |
| log | c8aba15c222e5bb8cf5d2d48678761197f564351 |
| tree | 60a645691b4ccd5414c7e718c3326fc40fad1657 |
| parent | b7b905d227c0124778214f7a307be04b7086ea6a |
Good riddance.61 files changed, 151 insertions(+), 648 deletions(-)
test/behavior.zig+9-12| ... | ... | @@ -94,6 +94,8 @@ test { |
| 94 | 94 | _ = @import("behavior/bugs/12551.zig"); |
| 95 | 95 | _ = @import("behavior/bugs/12644.zig"); |
| 96 | 96 | _ = @import("behavior/bugs/12680.zig"); |
| 97 | _ = @import("behavior/bugs/12723.zig"); | |
| 98 | _ = @import("behavior/bugs/12776.zig"); | |
| 97 | 99 | _ = @import("behavior/bugs/12786.zig"); |
| 98 | 100 | _ = @import("behavior/bugs/12794.zig"); |
| 99 | 101 | _ = @import("behavior/bugs/12801-1.zig"); |
| ... | ... | @@ -112,8 +114,8 @@ test { |
| 112 | 114 | _ = @import("behavior/bugs/13069.zig"); |
| 113 | 115 | _ = @import("behavior/bugs/13112.zig"); |
| 114 | 116 | _ = @import("behavior/bugs/13128.zig"); |
| 115 | _ = @import("behavior/bugs/13164.zig"); | |
| 116 | 117 | _ = @import("behavior/bugs/13159.zig"); |
| 118 | _ = @import("behavior/bugs/13164.zig"); | |
| 117 | 119 | _ = @import("behavior/bugs/13171.zig"); |
| 118 | 120 | _ = @import("behavior/bugs/13285.zig"); |
| 119 | 121 | _ = @import("behavior/bugs/13435.zig"); |
| ... | ... | @@ -126,7 +128,9 @@ test { |
| 126 | 128 | _ = @import("behavior/cast_int.zig"); |
| 127 | 129 | _ = @import("behavior/comptime_memory.zig"); |
| 128 | 130 | _ = @import("behavior/const_slice_child.zig"); |
| 131 | _ = @import("behavior/decltest.zig"); | |
| 129 | 132 | _ = @import("behavior/defer.zig"); |
| 133 | _ = @import("behavior/empty_union.zig"); | |
| 130 | 134 | _ = @import("behavior/enum.zig"); |
| 131 | 135 | _ = @import("behavior/error.zig"); |
| 132 | 136 | _ = @import("behavior/eval.zig"); |
| ... | ... | @@ -142,6 +146,7 @@ test { |
| 142 | 146 | _ = @import("behavior/if.zig"); |
| 143 | 147 | _ = @import("behavior/import.zig"); |
| 144 | 148 | _ = @import("behavior/incomplete_struct_param_tld.zig"); |
| 149 | _ = @import("behavior/inline_switch.zig"); | |
| 145 | 150 | _ = @import("behavior/int128.zig"); |
| 146 | 151 | _ = @import("behavior/int_div.zig"); |
| 147 | 152 | _ = @import("behavior/inttoptr.zig"); |
| ... | ... | @@ -154,6 +159,8 @@ test { |
| 154 | 159 | _ = @import("behavior/namespace_depends_on_compile_var.zig"); |
| 155 | 160 | _ = @import("behavior/null.zig"); |
| 156 | 161 | _ = @import("behavior/optional.zig"); |
| 162 | _ = @import("behavior/packed-struct.zig"); | |
| 163 | _ = @import("behavior/packed_struct_explicit_backing_int.zig"); | |
| 157 | 164 | _ = @import("behavior/pointers.zig"); |
| 158 | 165 | _ = @import("behavior/popcount.zig"); |
| 159 | 166 | _ = @import("behavior/prefetch.zig"); |
| ... | ... | @@ -169,7 +176,6 @@ test { |
| 169 | 176 | _ = @import("behavior/slice_sentinel_comptime.zig"); |
| 170 | 177 | _ = @import("behavior/src.zig"); |
| 171 | 178 | _ = @import("behavior/struct.zig"); |
| 172 | _ = @import("behavior/packed-struct.zig"); | |
| 173 | 179 | _ = @import("behavior/struct_contains_null_ptr_itself.zig"); |
| 174 | 180 | _ = @import("behavior/struct_contains_slice_of_itself.zig"); |
| 175 | 181 | _ = @import("behavior/switch.zig"); |
| ... | ... | @@ -180,6 +186,7 @@ test { |
| 180 | 186 | _ = @import("behavior/truncate.zig"); |
| 181 | 187 | _ = @import("behavior/try.zig"); |
| 182 | 188 | _ = @import("behavior/tuple.zig"); |
| 189 | _ = @import("behavior/tuple_declarations.zig"); | |
| 183 | 190 | _ = @import("behavior/type.zig"); |
| 184 | 191 | _ = @import("behavior/type_info.zig"); |
| 185 | 192 | _ = @import("behavior/typename.zig"); |
| ... | ... | @@ -198,16 +205,6 @@ test { |
| 198 | 205 | _ = @import("behavior/wasm.zig"); |
| 199 | 206 | } |
| 200 | 207 | |
| 201 | if (builtin.zig_backend != .stage1) { | |
| 202 | _ = @import("behavior/decltest.zig"); | |
| 203 | _ = @import("behavior/packed_struct_explicit_backing_int.zig"); | |
| 204 | _ = @import("behavior/empty_union.zig"); | |
| 205 | _ = @import("behavior/inline_switch.zig"); | |
| 206 | _ = @import("behavior/tuple_declarations.zig"); | |
| 207 | _ = @import("behavior/bugs/12723.zig"); | |
| 208 | _ = @import("behavior/bugs/12776.zig"); | |
| 209 | } | |
| 210 | ||
| 211 | 208 | if (builtin.os.tag != .wasi) { |
| 212 | 209 | _ = @import("behavior/asm.zig"); |
| 213 | 210 | } |
test/behavior/align.zig+1-15| ... | ... | @@ -16,7 +16,6 @@ test "global variable alignment" { |
| 16 | 16 | } |
| 17 | 17 | |
| 18 | 18 | test "slicing array of length 1 can not assume runtime index is always zero" { |
| 19 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 20 | 19 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
| 21 | 20 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 22 | 21 | |
| ... | ... | @@ -61,10 +60,6 @@ test "alignment of struct with pointer has same alignment as usize" { |
| 61 | 60 | } |
| 62 | 61 | |
| 63 | 62 | test "alignment and size of structs with 128-bit fields" { |
| 64 | if (builtin.zig_backend == .stage1) { | |
| 65 | // stage1 gets the wrong answer for a lot of targets | |
| 66 | return error.SkipZigTest; | |
| 67 | } | |
| 68 | 63 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 69 | 64 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 70 | 65 | |
| ... | ... | @@ -313,7 +308,6 @@ test "function alignment" { |
| 313 | 308 | } |
| 314 | 309 | |
| 315 | 310 | test "implicitly decreasing fn alignment" { |
| 316 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 317 | 311 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 318 | 312 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| 319 | 313 | |
| ... | ... | @@ -337,7 +331,6 @@ fn alignedBig() align(16) i32 { |
| 337 | 331 | |
| 338 | 332 | test "@alignCast functions" { |
| 339 | 333 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 340 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 341 | 334 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| 342 | 335 | |
| 343 | 336 | // function alignment is a compile error on wasm32/wasm64 |
| ... | ... | @@ -380,8 +373,6 @@ test "function align expression depends on generic parameter" { |
| 380 | 373 | } |
| 381 | 374 | |
| 382 | 375 | test "function callconv expression depends on generic parameter" { |
| 383 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 384 | ||
| 385 | 376 | const S = struct { |
| 386 | 377 | fn doTheTest() !void { |
| 387 | 378 | try expect(foobar(.C, 1) == 2); |
| ... | ... | @@ -435,8 +426,6 @@ fn testIndex2(ptr: [*]align(4) u8, index: usize, comptime T: type) !void { |
| 435 | 426 | } |
| 436 | 427 | |
| 437 | 428 | test "alignment of function with c calling convention" { |
| 438 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 439 | ||
| 440 | 429 | var runtime_nothing = &nothing; |
| 441 | 430 | const casted1 = @ptrCast(*const u8, runtime_nothing); |
| 442 | 431 | const casted2 = @ptrCast(*const fn () callconv(.C) void, casted1); |
| ... | ... | @@ -495,7 +484,7 @@ test "struct field explicit alignment" { |
| 495 | 484 | } |
| 496 | 485 | |
| 497 | 486 | test "align(@alignOf(T)) T does not force resolution of T" { |
| 498 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; | |
| 487 | if (true) return error.SkipZigTest; // TODO | |
| 499 | 488 | |
| 500 | 489 | const S = struct { |
| 501 | 490 | const A = struct { |
| ... | ... | @@ -519,7 +508,6 @@ test "align(@alignOf(T)) T does not force resolution of T" { |
| 519 | 508 | } |
| 520 | 509 | |
| 521 | 510 | test "align(N) on functions" { |
| 522 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 523 | 511 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 524 | 512 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 525 | 513 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| ... | ... | @@ -557,8 +545,6 @@ test "@alignCast null" { |
| 557 | 545 | } |
| 558 | 546 | |
| 559 | 547 | test "alignment of slice element" { |
| 560 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 561 | ||
| 562 | 548 | const a: []align(1024) const u8 = undefined; |
| 563 | 549 | try expect(@TypeOf(&a[0]) == *align(1024) const u8); |
| 564 | 550 | } |
test/behavior/array.zig-6| ... | ... | @@ -102,12 +102,6 @@ test "array len field" { |
| 102 | 102 | } |
| 103 | 103 | |
| 104 | 104 | test "array with sentinels" { |
| 105 | if (builtin.zig_backend == .stage1) { | |
| 106 | // Stage1 test coverage disabled at runtime because of | |
| 107 | // https://github.com/ziglang/zig/issues/4372 | |
| 108 | return error.SkipZigTest; | |
| 109 | } | |
| 110 | ||
| 111 | 105 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 112 | 106 | |
| 113 | 107 | const S = struct { |
test/behavior/async_fn.zig+66-66| ... | ... | @@ -8,7 +8,7 @@ const expectError = std.testing.expectError; |
| 8 | 8 | var global_x: i32 = 1; |
| 9 | 9 | |
| 10 | 10 | test "simple coroutine suspend and resume" { |
| 11 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 11 | if (true) return error.SkipZigTest; // TODO | |
| 12 | 12 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 13 | 13 | |
| 14 | 14 | var frame = async simpleAsyncFn(); |
| ... | ... | @@ -31,7 +31,7 @@ fn simpleAsyncFn() void { |
| 31 | 31 | var global_y: i32 = 1; |
| 32 | 32 | |
| 33 | 33 | test "pass parameter to coroutine" { |
| 34 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 34 | if (true) return error.SkipZigTest; // TODO | |
| 35 | 35 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 36 | 36 | |
| 37 | 37 | var p = async simpleAsyncFnWithArg(2); |
| ... | ... | @@ -46,7 +46,7 @@ fn simpleAsyncFnWithArg(delta: i32) void { |
| 46 | 46 | } |
| 47 | 47 | |
| 48 | 48 | test "suspend at end of function" { |
| 49 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 49 | if (true) return error.SkipZigTest; // TODO | |
| 50 | 50 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 51 | 51 | |
| 52 | 52 | const S = struct { |
| ... | ... | @@ -68,7 +68,7 @@ test "suspend at end of function" { |
| 68 | 68 | } |
| 69 | 69 | |
| 70 | 70 | test "local variable in async function" { |
| 71 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 71 | if (true) return error.SkipZigTest; // TODO | |
| 72 | 72 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 73 | 73 | |
| 74 | 74 | const S = struct { |
| ... | ... | @@ -100,7 +100,7 @@ test "local variable in async function" { |
| 100 | 100 | } |
| 101 | 101 | |
| 102 | 102 | test "calling an inferred async function" { |
| 103 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 103 | if (true) return error.SkipZigTest; // TODO | |
| 104 | 104 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 105 | 105 | |
| 106 | 106 | const S = struct { |
| ... | ... | @@ -127,7 +127,7 @@ test "calling an inferred async function" { |
| 127 | 127 | } |
| 128 | 128 | |
| 129 | 129 | test "@frameSize" { |
| 130 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 130 | if (true) return error.SkipZigTest; // TODO | |
| 131 | 131 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 132 | 132 | |
| 133 | 133 | if (builtin.target.cpu.arch == .thumb or builtin.target.cpu.arch == .thumbeb) |
| ... | ... | @@ -161,7 +161,7 @@ test "@frameSize" { |
| 161 | 161 | } |
| 162 | 162 | |
| 163 | 163 | test "coroutine suspend, resume" { |
| 164 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 164 | if (true) return error.SkipZigTest; // TODO | |
| 165 | 165 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 166 | 166 | |
| 167 | 167 | const S = struct { |
| ... | ... | @@ -205,7 +205,7 @@ test "coroutine suspend, resume" { |
| 205 | 205 | } |
| 206 | 206 | |
| 207 | 207 | test "coroutine suspend with block" { |
| 208 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 208 | if (true) return error.SkipZigTest; // TODO | |
| 209 | 209 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 210 | 210 | |
| 211 | 211 | const p = async testSuspendBlock(); |
| ... | ... | @@ -234,7 +234,7 @@ var await_a_promise: anyframe = undefined; |
| 234 | 234 | var await_final_result: i32 = 0; |
| 235 | 235 | |
| 236 | 236 | test "coroutine await" { |
| 237 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 237 | if (true) return error.SkipZigTest; // TODO | |
| 238 | 238 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 239 | 239 | |
| 240 | 240 | await_seq('a'); |
| ... | ... | @@ -274,7 +274,7 @@ fn await_seq(c: u8) void { |
| 274 | 274 | var early_final_result: i32 = 0; |
| 275 | 275 | |
| 276 | 276 | test "coroutine await early return" { |
| 277 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 277 | if (true) return error.SkipZigTest; // TODO | |
| 278 | 278 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 279 | 279 | |
| 280 | 280 | early_seq('a'); |
| ... | ... | @@ -305,7 +305,7 @@ fn early_seq(c: u8) void { |
| 305 | 305 | } |
| 306 | 306 | |
| 307 | 307 | test "async function with dot syntax" { |
| 308 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 308 | if (true) return error.SkipZigTest; // TODO | |
| 309 | 309 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 310 | 310 | |
| 311 | 311 | const S = struct { |
| ... | ... | @@ -321,7 +321,7 @@ test "async function with dot syntax" { |
| 321 | 321 | } |
| 322 | 322 | |
| 323 | 323 | test "async fn pointer in a struct field" { |
| 324 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 324 | if (true) return error.SkipZigTest; // TODO | |
| 325 | 325 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 326 | 326 | |
| 327 | 327 | var data: i32 = 1; |
| ... | ... | @@ -349,7 +349,7 @@ fn simpleAsyncFn2(y: *i32) callconv(.Async) void { |
| 349 | 349 | } |
| 350 | 350 | |
| 351 | 351 | test "@asyncCall with return type" { |
| 352 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 352 | if (true) return error.SkipZigTest; // TODO | |
| 353 | 353 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 354 | 354 | |
| 355 | 355 | const Foo = struct { |
| ... | ... | @@ -376,7 +376,7 @@ test "@asyncCall with return type" { |
| 376 | 376 | } |
| 377 | 377 | |
| 378 | 378 | test "async fn with inferred error set" { |
| 379 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 379 | if (true) return error.SkipZigTest; // TODO | |
| 380 | 380 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 381 | 381 | |
| 382 | 382 | const S = struct { |
| ... | ... | @@ -409,7 +409,7 @@ test "async fn with inferred error set" { |
| 409 | 409 | } |
| 410 | 410 | |
| 411 | 411 | test "error return trace across suspend points - early return" { |
| 412 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 412 | if (true) return error.SkipZigTest; // TODO | |
| 413 | 413 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 414 | 414 | |
| 415 | 415 | const p = nonFailing(); |
| ... | ... | @@ -419,7 +419,7 @@ test "error return trace across suspend points - early return" { |
| 419 | 419 | } |
| 420 | 420 | |
| 421 | 421 | test "error return trace across suspend points - async return" { |
| 422 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 422 | if (true) return error.SkipZigTest; // TODO | |
| 423 | 423 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 424 | 424 | |
| 425 | 425 | const p = nonFailing(); |
| ... | ... | @@ -452,7 +452,7 @@ fn printTrace(p: anyframe->(anyerror!void)) callconv(.Async) void { |
| 452 | 452 | } |
| 453 | 453 | |
| 454 | 454 | test "break from suspend" { |
| 455 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 455 | if (true) return error.SkipZigTest; // TODO | |
| 456 | 456 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 457 | 457 | |
| 458 | 458 | var my_result: i32 = 1; |
| ... | ... | @@ -470,7 +470,7 @@ fn testBreakFromSuspend(my_result: *i32) callconv(.Async) void { |
| 470 | 470 | } |
| 471 | 471 | |
| 472 | 472 | test "heap allocated async function frame" { |
| 473 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 473 | if (true) return error.SkipZigTest; // TODO | |
| 474 | 474 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 475 | 475 | |
| 476 | 476 | const S = struct { |
| ... | ... | @@ -497,7 +497,7 @@ test "heap allocated async function frame" { |
| 497 | 497 | } |
| 498 | 498 | |
| 499 | 499 | test "async function call return value" { |
| 500 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 500 | if (true) return error.SkipZigTest; // TODO | |
| 501 | 501 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 502 | 502 | |
| 503 | 503 | const S = struct { |
| ... | ... | @@ -541,7 +541,7 @@ test "async function call return value" { |
| 541 | 541 | } |
| 542 | 542 | |
| 543 | 543 | test "suspension points inside branching control flow" { |
| 544 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 544 | if (true) return error.SkipZigTest; // TODO | |
| 545 | 545 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 546 | 546 | |
| 547 | 547 | const S = struct { |
| ... | ... | @@ -570,7 +570,7 @@ test "suspension points inside branching control flow" { |
| 570 | 570 | } |
| 571 | 571 | |
| 572 | 572 | test "call async function which has struct return type" { |
| 573 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 573 | if (true) return error.SkipZigTest; // TODO | |
| 574 | 574 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 575 | 575 | |
| 576 | 576 | const S = struct { |
| ... | ... | @@ -606,7 +606,7 @@ test "call async function which has struct return type" { |
| 606 | 606 | } |
| 607 | 607 | |
| 608 | 608 | test "pass string literal to async function" { |
| 609 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 609 | if (true) return error.SkipZigTest; // TODO | |
| 610 | 610 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 611 | 611 | |
| 612 | 612 | const S = struct { |
| ... | ... | @@ -630,7 +630,7 @@ test "pass string literal to async function" { |
| 630 | 630 | } |
| 631 | 631 | |
| 632 | 632 | test "await inside an errdefer" { |
| 633 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 633 | if (true) return error.SkipZigTest; // TODO | |
| 634 | 634 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 635 | 635 | |
| 636 | 636 | const S = struct { |
| ... | ... | @@ -656,7 +656,7 @@ test "await inside an errdefer" { |
| 656 | 656 | } |
| 657 | 657 | |
| 658 | 658 | test "try in an async function with error union and non-zero-bit payload" { |
| 659 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 659 | if (true) return error.SkipZigTest; // TODO | |
| 660 | 660 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 661 | 661 | |
| 662 | 662 | const S = struct { |
| ... | ... | @@ -689,7 +689,7 @@ test "try in an async function with error union and non-zero-bit payload" { |
| 689 | 689 | } |
| 690 | 690 | |
| 691 | 691 | test "returning a const error from async function" { |
| 692 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 692 | if (true) return error.SkipZigTest; // TODO | |
| 693 | 693 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 694 | 694 | |
| 695 | 695 | const S = struct { |
| ... | ... | @@ -723,7 +723,7 @@ test "returning a const error from async function" { |
| 723 | 723 | } |
| 724 | 724 | |
| 725 | 725 | test "async/await typical usage" { |
| 726 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 726 | if (true) return error.SkipZigTest; // TODO | |
| 727 | 727 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 728 | 728 | |
| 729 | 729 | inline for ([_]bool{ false, true }) |b1| { |
| ... | ... | @@ -821,7 +821,7 @@ fn testAsyncAwaitTypicalUsage( |
| 821 | 821 | } |
| 822 | 822 | |
| 823 | 823 | test "alignment of local variables in async functions" { |
| 824 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 824 | if (true) return error.SkipZigTest; // TODO | |
| 825 | 825 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 826 | 826 | |
| 827 | 827 | const S = struct { |
| ... | ... | @@ -836,7 +836,7 @@ test "alignment of local variables in async functions" { |
| 836 | 836 | } |
| 837 | 837 | |
| 838 | 838 | test "no reason to resolve frame still works" { |
| 839 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 839 | if (true) return error.SkipZigTest; // TODO | |
| 840 | 840 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 841 | 841 | |
| 842 | 842 | _ = async simpleNothing(); |
| ... | ... | @@ -847,7 +847,7 @@ fn simpleNothing() void { |
| 847 | 847 | } |
| 848 | 848 | |
| 849 | 849 | test "async call a generic function" { |
| 850 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 850 | if (true) return error.SkipZigTest; // TODO | |
| 851 | 851 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 852 | 852 | |
| 853 | 853 | const S = struct { |
| ... | ... | @@ -870,7 +870,7 @@ test "async call a generic function" { |
| 870 | 870 | } |
| 871 | 871 | |
| 872 | 872 | test "return from suspend block" { |
| 873 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 873 | if (true) return error.SkipZigTest; // TODO | |
| 874 | 874 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 875 | 875 | |
| 876 | 876 | const S = struct { |
| ... | ... | @@ -887,7 +887,7 @@ test "return from suspend block" { |
| 887 | 887 | } |
| 888 | 888 | |
| 889 | 889 | test "struct parameter to async function is copied to the frame" { |
| 890 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 890 | if (true) return error.SkipZigTest; // TODO | |
| 891 | 891 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 892 | 892 | |
| 893 | 893 | const S = struct { |
| ... | ... | @@ -934,7 +934,7 @@ test "struct parameter to async function is copied to the frame" { |
| 934 | 934 | } |
| 935 | 935 | |
| 936 | 936 | test "cast fn to async fn when it is inferred to be async" { |
| 937 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 937 | if (true) return error.SkipZigTest; // TODO | |
| 938 | 938 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 939 | 939 | |
| 940 | 940 | const S = struct { |
| ... | ... | @@ -965,7 +965,7 @@ test "cast fn to async fn when it is inferred to be async" { |
| 965 | 965 | } |
| 966 | 966 | |
| 967 | 967 | test "cast fn to async fn when it is inferred to be async, awaited directly" { |
| 968 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 968 | if (true) return error.SkipZigTest; // TODO | |
| 969 | 969 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 970 | 970 | |
| 971 | 971 | const S = struct { |
| ... | ... | @@ -995,7 +995,7 @@ test "cast fn to async fn when it is inferred to be async, awaited directly" { |
| 995 | 995 | } |
| 996 | 996 | |
| 997 | 997 | test "await does not force async if callee is blocking" { |
| 998 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 998 | if (true) return error.SkipZigTest; // TODO | |
| 999 | 999 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 1000 | 1000 | |
| 1001 | 1001 | const S = struct { |
| ... | ... | @@ -1008,7 +1008,7 @@ test "await does not force async if callee is blocking" { |
| 1008 | 1008 | } |
| 1009 | 1009 | |
| 1010 | 1010 | test "recursive async function" { |
| 1011 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 1011 | if (true) return error.SkipZigTest; // TODO | |
| 1012 | 1012 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 1013 | 1013 | |
| 1014 | 1014 | try expect(recursiveAsyncFunctionTest(false).doTheTest() == 55); |
| ... | ... | @@ -1073,7 +1073,7 @@ fn recursiveAsyncFunctionTest(comptime suspending_implementation: bool) type { |
| 1073 | 1073 | } |
| 1074 | 1074 | |
| 1075 | 1075 | test "@asyncCall with comptime-known function, but not awaited directly" { |
| 1076 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 1076 | if (true) return error.SkipZigTest; // TODO | |
| 1077 | 1077 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 1078 | 1078 | |
| 1079 | 1079 | const S = struct { |
| ... | ... | @@ -1105,7 +1105,7 @@ test "@asyncCall with comptime-known function, but not awaited directly" { |
| 1105 | 1105 | } |
| 1106 | 1106 | |
| 1107 | 1107 | test "@asyncCall with actual frame instead of byte buffer" { |
| 1108 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 1108 | if (true) return error.SkipZigTest; // TODO | |
| 1109 | 1109 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 1110 | 1110 | |
| 1111 | 1111 | const S = struct { |
| ... | ... | @@ -1122,7 +1122,7 @@ test "@asyncCall with actual frame instead of byte buffer" { |
| 1122 | 1122 | } |
| 1123 | 1123 | |
| 1124 | 1124 | test "@asyncCall using the result location inside the frame" { |
| 1125 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 1125 | if (true) return error.SkipZigTest; // TODO | |
| 1126 | 1126 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 1127 | 1127 | |
| 1128 | 1128 | const S = struct { |
| ... | ... | @@ -1152,7 +1152,7 @@ test "@asyncCall using the result location inside the frame" { |
| 1152 | 1152 | } |
| 1153 | 1153 | |
| 1154 | 1154 | test "@TypeOf an async function call of generic fn with error union type" { |
| 1155 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 1155 | if (true) return error.SkipZigTest; // TODO | |
| 1156 | 1156 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 1157 | 1157 | |
| 1158 | 1158 | const S = struct { |
| ... | ... | @@ -1166,7 +1166,7 @@ test "@TypeOf an async function call of generic fn with error union type" { |
| 1166 | 1166 | } |
| 1167 | 1167 | |
| 1168 | 1168 | test "using @TypeOf on a generic function call" { |
| 1169 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 1169 | if (true) return error.SkipZigTest; // TODO | |
| 1170 | 1170 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 1171 | 1171 | |
| 1172 | 1172 | const S = struct { |
| ... | ... | @@ -1194,7 +1194,7 @@ test "using @TypeOf on a generic function call" { |
| 1194 | 1194 | } |
| 1195 | 1195 | |
| 1196 | 1196 | test "recursive call of await @asyncCall with struct return type" { |
| 1197 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 1197 | if (true) return error.SkipZigTest; // TODO | |
| 1198 | 1198 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 1199 | 1199 | |
| 1200 | 1200 | const S = struct { |
| ... | ... | @@ -1233,7 +1233,7 @@ test "recursive call of await @asyncCall with struct return type" { |
| 1233 | 1233 | } |
| 1234 | 1234 | |
| 1235 | 1235 | test "nosuspend function call" { |
| 1236 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 1236 | if (true) return error.SkipZigTest; // TODO | |
| 1237 | 1237 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 1238 | 1238 | |
| 1239 | 1239 | const S = struct { |
| ... | ... | @@ -1252,7 +1252,7 @@ test "nosuspend function call" { |
| 1252 | 1252 | } |
| 1253 | 1253 | |
| 1254 | 1254 | test "await used in expression and awaiting fn with no suspend but async calling convention" { |
| 1255 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 1255 | if (true) return error.SkipZigTest; // TODO | |
| 1256 | 1256 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 1257 | 1257 | |
| 1258 | 1258 | const S = struct { |
| ... | ... | @@ -1271,7 +1271,7 @@ test "await used in expression and awaiting fn with no suspend but async calling |
| 1271 | 1271 | } |
| 1272 | 1272 | |
| 1273 | 1273 | test "await used in expression after a fn call" { |
| 1274 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 1274 | if (true) return error.SkipZigTest; // TODO | |
| 1275 | 1275 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 1276 | 1276 | |
| 1277 | 1277 | const S = struct { |
| ... | ... | @@ -1292,7 +1292,7 @@ test "await used in expression after a fn call" { |
| 1292 | 1292 | } |
| 1293 | 1293 | |
| 1294 | 1294 | test "async fn call used in expression after a fn call" { |
| 1295 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 1295 | if (true) return error.SkipZigTest; // TODO | |
| 1296 | 1296 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 1297 | 1297 | |
| 1298 | 1298 | const S = struct { |
| ... | ... | @@ -1312,7 +1312,7 @@ test "async fn call used in expression after a fn call" { |
| 1312 | 1312 | } |
| 1313 | 1313 | |
| 1314 | 1314 | test "suspend in for loop" { |
| 1315 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 1315 | if (true) return error.SkipZigTest; // TODO | |
| 1316 | 1316 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 1317 | 1317 | |
| 1318 | 1318 | const S = struct { |
| ... | ... | @@ -1341,7 +1341,7 @@ test "suspend in for loop" { |
| 1341 | 1341 | } |
| 1342 | 1342 | |
| 1343 | 1343 | test "suspend in while loop" { |
| 1344 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 1344 | if (true) return error.SkipZigTest; // TODO | |
| 1345 | 1345 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 1346 | 1346 | |
| 1347 | 1347 | const S = struct { |
| ... | ... | @@ -1381,7 +1381,7 @@ test "suspend in while loop" { |
| 1381 | 1381 | } |
| 1382 | 1382 | |
| 1383 | 1383 | test "correctly spill when returning the error union result of another async fn" { |
| 1384 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 1384 | if (true) return error.SkipZigTest; // TODO | |
| 1385 | 1385 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 1386 | 1386 | |
| 1387 | 1387 | const S = struct { |
| ... | ... | @@ -1407,7 +1407,7 @@ test "correctly spill when returning the error union result of another async fn" |
| 1407 | 1407 | } |
| 1408 | 1408 | |
| 1409 | 1409 | test "spill target expr in a for loop" { |
| 1410 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 1410 | if (true) return error.SkipZigTest; // TODO | |
| 1411 | 1411 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 1412 | 1412 | |
| 1413 | 1413 | const S = struct { |
| ... | ... | @@ -1441,7 +1441,7 @@ test "spill target expr in a for loop" { |
| 1441 | 1441 | } |
| 1442 | 1442 | |
| 1443 | 1443 | test "spill target expr in a for loop, with a var decl in the loop body" { |
| 1444 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 1444 | if (true) return error.SkipZigTest; // TODO | |
| 1445 | 1445 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 1446 | 1446 | |
| 1447 | 1447 | const S = struct { |
| ... | ... | @@ -1480,7 +1480,7 @@ test "spill target expr in a for loop, with a var decl in the loop body" { |
| 1480 | 1480 | } |
| 1481 | 1481 | |
| 1482 | 1482 | test "async call with @call" { |
| 1483 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 1483 | if (true) return error.SkipZigTest; // TODO | |
| 1484 | 1484 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 1485 | 1485 | |
| 1486 | 1486 | const S = struct { |
| ... | ... | @@ -1505,7 +1505,7 @@ test "async call with @call" { |
| 1505 | 1505 | } |
| 1506 | 1506 | |
| 1507 | 1507 | test "async function passed 0-bit arg after non-0-bit arg" { |
| 1508 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 1508 | if (true) return error.SkipZigTest; // TODO | |
| 1509 | 1509 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 1510 | 1510 | |
| 1511 | 1511 | const S = struct { |
| ... | ... | @@ -1529,7 +1529,7 @@ test "async function passed 0-bit arg after non-0-bit arg" { |
| 1529 | 1529 | } |
| 1530 | 1530 | |
| 1531 | 1531 | test "async function passed align(16) arg after align(8) arg" { |
| 1532 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 1532 | if (true) return error.SkipZigTest; // TODO | |
| 1533 | 1533 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 1534 | 1534 | |
| 1535 | 1535 | const S = struct { |
| ... | ... | @@ -1554,7 +1554,7 @@ test "async function passed align(16) arg after align(8) arg" { |
| 1554 | 1554 | } |
| 1555 | 1555 | |
| 1556 | 1556 | test "async function call resolves target fn frame, comptime func" { |
| 1557 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 1557 | if (true) return error.SkipZigTest; // TODO | |
| 1558 | 1558 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 1559 | 1559 | |
| 1560 | 1560 | const S = struct { |
| ... | ... | @@ -1579,7 +1579,7 @@ test "async function call resolves target fn frame, comptime func" { |
| 1579 | 1579 | } |
| 1580 | 1580 | |
| 1581 | 1581 | test "async function call resolves target fn frame, runtime func" { |
| 1582 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 1582 | if (true) return error.SkipZigTest; // TODO | |
| 1583 | 1583 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 1584 | 1584 | |
| 1585 | 1585 | const S = struct { |
| ... | ... | @@ -1605,7 +1605,7 @@ test "async function call resolves target fn frame, runtime func" { |
| 1605 | 1605 | } |
| 1606 | 1606 | |
| 1607 | 1607 | test "properly spill optional payload capture value" { |
| 1608 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 1608 | if (true) return error.SkipZigTest; // TODO | |
| 1609 | 1609 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 1610 | 1610 | |
| 1611 | 1611 | const S = struct { |
| ... | ... | @@ -1632,7 +1632,7 @@ test "properly spill optional payload capture value" { |
| 1632 | 1632 | } |
| 1633 | 1633 | |
| 1634 | 1634 | test "handle defer interfering with return value spill" { |
| 1635 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 1635 | if (true) return error.SkipZigTest; // TODO | |
| 1636 | 1636 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 1637 | 1637 | |
| 1638 | 1638 | const S = struct { |
| ... | ... | @@ -1675,7 +1675,7 @@ test "handle defer interfering with return value spill" { |
| 1675 | 1675 | } |
| 1676 | 1676 | |
| 1677 | 1677 | test "take address of temporary async frame" { |
| 1678 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 1678 | if (true) return error.SkipZigTest; // TODO | |
| 1679 | 1679 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 1680 | 1680 | |
| 1681 | 1681 | const S = struct { |
| ... | ... | @@ -1707,7 +1707,7 @@ test "take address of temporary async frame" { |
| 1707 | 1707 | } |
| 1708 | 1708 | |
| 1709 | 1709 | test "nosuspend await" { |
| 1710 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 1710 | if (true) return error.SkipZigTest; // TODO | |
| 1711 | 1711 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 1712 | 1712 | |
| 1713 | 1713 | const S = struct { |
| ... | ... | @@ -1731,7 +1731,7 @@ test "nosuspend await" { |
| 1731 | 1731 | } |
| 1732 | 1732 | |
| 1733 | 1733 | test "nosuspend on function calls" { |
| 1734 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 1734 | if (true) return error.SkipZigTest; // TODO | |
| 1735 | 1735 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 1736 | 1736 | |
| 1737 | 1737 | const S0 = struct { |
| ... | ... | @@ -1750,7 +1750,7 @@ test "nosuspend on function calls" { |
| 1750 | 1750 | } |
| 1751 | 1751 | |
| 1752 | 1752 | test "nosuspend on async function calls" { |
| 1753 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 1753 | if (true) return error.SkipZigTest; // TODO | |
| 1754 | 1754 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 1755 | 1755 | |
| 1756 | 1756 | const S0 = struct { |
| ... | ... | @@ -1771,7 +1771,7 @@ test "nosuspend on async function calls" { |
| 1771 | 1771 | } |
| 1772 | 1772 | |
| 1773 | 1773 | // test "resume nosuspend async function calls" { |
| 1774 | // if (builtin.zig_backend != .stage1) return error.SkipZigTest; // if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO | |
| 1774 | // if (true) return error.SkipZigTest; // if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO | |
| 1775 | 1775 | // const S0 = struct { |
| 1776 | 1776 | // b: i32 = 42, |
| 1777 | 1777 | // }; |
| ... | ... | @@ -1794,7 +1794,7 @@ test "nosuspend on async function calls" { |
| 1794 | 1794 | // } |
| 1795 | 1795 | |
| 1796 | 1796 | test "nosuspend resume async function calls" { |
| 1797 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 1797 | if (true) return error.SkipZigTest; // TODO | |
| 1798 | 1798 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 1799 | 1799 | |
| 1800 | 1800 | const S0 = struct { |
| ... | ... | @@ -1819,7 +1819,7 @@ test "nosuspend resume async function calls" { |
| 1819 | 1819 | } |
| 1820 | 1820 | |
| 1821 | 1821 | test "avoid forcing frame alignment resolution implicit cast to *anyopaque" { |
| 1822 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 1822 | if (true) return error.SkipZigTest; // TODO | |
| 1823 | 1823 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 1824 | 1824 | |
| 1825 | 1825 | const S = struct { |
| ... | ... | @@ -1838,7 +1838,7 @@ test "avoid forcing frame alignment resolution implicit cast to *anyopaque" { |
| 1838 | 1838 | } |
| 1839 | 1839 | |
| 1840 | 1840 | test "@asyncCall with pass-by-value arguments" { |
| 1841 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 1841 | if (true) return error.SkipZigTest; // TODO | |
| 1842 | 1842 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 1843 | 1843 | |
| 1844 | 1844 | const F0: u64 = 0xbeefbeefbeefbeef; |
| ... | ... | @@ -1874,7 +1874,7 @@ test "@asyncCall with pass-by-value arguments" { |
| 1874 | 1874 | } |
| 1875 | 1875 | |
| 1876 | 1876 | test "@asyncCall with arguments having non-standard alignment" { |
| 1877 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 1877 | if (true) return error.SkipZigTest; // TODO | |
| 1878 | 1878 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 1879 | 1879 | |
| 1880 | 1880 | const F0: u64 = 0xbeefbeef; |
test/behavior/atomics.zig+3-5| ... | ... | @@ -151,9 +151,7 @@ test "cmpxchg on a global variable" { |
| 151 | 151 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 152 | 152 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 153 | 153 | |
| 154 | if ((builtin.zig_backend == .stage1 or builtin.zig_backend == .stage2_llvm) and | |
| 155 | builtin.cpu.arch == .aarch64) | |
| 156 | { | |
| 154 | if (builtin.zig_backend == .stage2_llvm and builtin.cpu.arch == .aarch64) { | |
| 157 | 155 | // https://github.com/ziglang/zig/issues/10627 |
| 158 | 156 | return error.SkipZigTest; |
| 159 | 157 | } |
| ... | ... | @@ -220,8 +218,8 @@ test "atomicrmw with floats" { |
| 220 | 218 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 221 | 219 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 222 | 220 | |
| 223 | if ((builtin.zig_backend == .stage1 or builtin.zig_backend == .stage2_llvm or | |
| 224 | builtin.zig_backend == .stage2_c) and builtin.cpu.arch == .aarch64) | |
| 221 | if ((builtin.zig_backend == .stage2_llvm or builtin.zig_backend == .stage2_c) and | |
| 222 | builtin.cpu.arch == .aarch64) | |
| 225 | 223 | { |
| 226 | 224 | // https://github.com/ziglang/zig/issues/10627 |
| 227 | 225 | return error.SkipZigTest; |
test/behavior/await_struct.zig+1-1| ... | ... | @@ -10,7 +10,7 @@ var await_a_promise: anyframe = undefined; |
| 10 | 10 | var await_final_result = Foo{ .x = 0 }; |
| 11 | 11 | |
| 12 | 12 | test "coroutine await struct" { |
| 13 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 13 | if (true) return error.SkipZigTest; // TODO | |
| 14 | 14 | |
| 15 | 15 | await_seq('a'); |
| 16 | 16 | var p = async await_amain(); |
test/behavior/basic.zig+1-19| ... | ... | @@ -198,11 +198,6 @@ const OpaqueA = opaque {}; |
| 198 | 198 | const OpaqueB = opaque {}; |
| 199 | 199 | |
| 200 | 200 | test "opaque types" { |
| 201 | if (builtin.zig_backend == .stage1) { | |
| 202 | // stage1 gets the type names wrong | |
| 203 | return error.SkipZigTest; | |
| 204 | } | |
| 205 | ||
| 206 | 201 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 207 | 202 | |
| 208 | 203 | try expect(*OpaqueA != *OpaqueB); |
| ... | ... | @@ -290,7 +285,6 @@ fn fB() []const u8 { |
| 290 | 285 | |
| 291 | 286 | test "call function pointer in struct" { |
| 292 | 287 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 293 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 294 | 288 | |
| 295 | 289 | try expect(mem.eql(u8, f3(true), "a")); |
| 296 | 290 | try expect(mem.eql(u8, f3(false), "b")); |
| ... | ... | @@ -329,7 +323,6 @@ fn copy(src: *const u64, dst: *u64) void { |
| 329 | 323 | } |
| 330 | 324 | |
| 331 | 325 | test "call result of if else expression" { |
| 332 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; // stage1 has different function pointers | |
| 333 | 326 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 334 | 327 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| 335 | 328 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| ... | ... | @@ -573,22 +566,16 @@ fn emptyFn() void {} |
| 573 | 566 | |
| 574 | 567 | const addr1 = @ptrCast(*const u8, &emptyFn); |
| 575 | 568 | test "comptime cast fn to ptr" { |
| 576 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 577 | ||
| 578 | 569 | const addr2 = @ptrCast(*const u8, &emptyFn); |
| 579 | 570 | comptime try expect(addr1 == addr2); |
| 580 | 571 | } |
| 581 | 572 | |
| 582 | 573 | test "equality compare fn ptrs" { |
| 583 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 584 | ||
| 585 | 574 | var a = &emptyFn; |
| 586 | 575 | try expect(a == a); |
| 587 | 576 | } |
| 588 | 577 | |
| 589 | 578 | test "self reference through fn ptr field" { |
| 590 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 591 | ||
| 592 | 579 | const S = struct { |
| 593 | 580 | const A = struct { |
| 594 | 581 | f: *const fn (A) u8, |
| ... | ... | @@ -783,10 +770,6 @@ test "auto created variables have correct alignment" { |
| 783 | 770 | } |
| 784 | 771 | |
| 785 | 772 | test "extern variable with non-pointer opaque type" { |
| 786 | if (builtin.zig_backend == .stage1) { | |
| 787 | // Regressed with LLVM 14 | |
| 788 | return error.SkipZigTest; | |
| 789 | } | |
| 790 | 773 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
| 791 | 774 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 792 | 775 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| ... | ... | @@ -963,7 +946,7 @@ test "array type comes from generic function" { |
| 963 | 946 | } |
| 964 | 947 | |
| 965 | 948 | test "generic function uses return type of other generic function" { |
| 966 | if (builtin.zig_backend != .stage1) { | |
| 949 | if (true) { | |
| 967 | 950 | // This test has been failing sporadically on the CI. |
| 968 | 951 | // It's not enough to verify that it works locally; we need to diagnose why |
| 969 | 952 | // it fails on the CI sometimes before turning it back on. |
| ... | ... | @@ -1067,7 +1050,6 @@ test "inline call of function with a switch inside the return statement" { |
| 1067 | 1050 | } |
| 1068 | 1051 | |
| 1069 | 1052 | test "namespace lookup ignores decl causing the lookup" { |
| 1070 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 1071 | 1053 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
| 1072 | 1054 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 1073 | 1055 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
test/behavior/bitcast.zig+1-7| ... | ... | @@ -155,10 +155,6 @@ test "bitcast generates a temporary value" { |
| 155 | 155 | } |
| 156 | 156 | |
| 157 | 157 | test "@bitCast packed structs at runtime and comptime" { |
| 158 | if (builtin.zig_backend == .stage1) { | |
| 159 | // stage1 gets the wrong answer for a lot of targets | |
| 160 | return error.SkipZigTest; | |
| 161 | } | |
| 162 | 158 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| 163 | 159 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 164 | 160 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| ... | ... | @@ -323,7 +319,6 @@ test "@bitCast packed struct of floats" { |
| 323 | 319 | } |
| 324 | 320 | |
| 325 | 321 | test "comptime @bitCast packed struct to int and back" { |
| 326 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 327 | 322 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; |
| 328 | 323 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; |
| 329 | 324 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| ... | ... | @@ -377,8 +372,7 @@ test "comptime bitcast with fields following f80" { |
| 377 | 372 | } |
| 378 | 373 | |
| 379 | 374 | test "bitcast vector to integer and back" { |
| 380 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO: https://github.com/ziglang/zig/issues/13220 | |
| 381 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; // stage1 gets the comptime cast wrong | |
| 375 | if (true) return error.SkipZigTest; // TODO: https://github.com/ziglang/zig/issues/13220 | |
| 382 | 376 | |
| 383 | 377 | const arr: [16]bool = [_]bool{ true, false } ++ [_]bool{true} ** 14; |
| 384 | 378 | var x = @splat(16, true); |
test/behavior/bitreverse.zig-6| ... | ... | @@ -5,8 +5,6 @@ const minInt = std.math.minInt; |
| 5 | 5 | |
| 6 | 6 | test "@bitReverse large exotic integer" { |
| 7 | 7 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; |
| 8 | // Currently failing on stage1 for big-endian targets | |
| 9 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 10 | 8 | |
| 11 | 9 | try expect(@bitReverse(@as(u95, 0x123456789abcdef111213141)) == 0x4146424447bd9eac8f351624); |
| 12 | 10 | } |
| ... | ... | @@ -96,7 +94,6 @@ fn vector8() !void { |
| 96 | 94 | } |
| 97 | 95 | |
| 98 | 96 | test "bitReverse vectors u8" { |
| 99 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 100 | 97 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; |
| 101 | 98 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; |
| 102 | 99 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| ... | ... | @@ -115,7 +112,6 @@ fn vector16() !void { |
| 115 | 112 | } |
| 116 | 113 | |
| 117 | 114 | test "bitReverse vectors u16" { |
| 118 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 119 | 115 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; |
| 120 | 116 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; |
| 121 | 117 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| ... | ... | @@ -134,7 +130,6 @@ fn vector24() !void { |
| 134 | 130 | } |
| 135 | 131 | |
| 136 | 132 | test "bitReverse vectors u24" { |
| 137 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 138 | 133 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; |
| 139 | 134 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; |
| 140 | 135 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| ... | ... | @@ -153,7 +148,6 @@ fn vector0() !void { |
| 153 | 148 | } |
| 154 | 149 | |
| 155 | 150 | test "bitReverse vectors u0" { |
| 156 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 157 | 151 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; |
| 158 | 152 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| 159 | 153 |
test/behavior/bugs/10147.zig+1-4| ... | ... | @@ -1,8 +1,7 @@ |
| 1 | 1 | const builtin = @import("builtin"); |
| 2 | 2 | const std = @import("std"); |
| 3 | 3 | |
| 4 | test "uses correct LLVM builtin" { | |
| 5 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 4 | test "test calling @clz on both vector and scalar inputs" { | |
| 6 | 5 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
| 7 | 6 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 8 | 7 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| ... | ... | @@ -11,8 +10,6 @@ test "uses correct LLVM builtin" { |
| 11 | 10 | |
| 12 | 11 | var x: u32 = 0x1; |
| 13 | 12 | var y: @Vector(4, u32) = [_]u32{ 0x1, 0x1, 0x1, 0x1 }; |
| 14 | // The stage1 compiler used to call the same builtin function for both | |
| 15 | // scalar and vector inputs, causing the LLVM module verification to fail. | |
| 16 | 13 | var a = @clz(x); |
| 17 | 14 | var b = @clz(y); |
| 18 | 15 | try std.testing.expectEqual(@as(u6, 31), a); |
test/behavior/bugs/11159.zig-2| ... | ... | @@ -8,8 +8,6 @@ test { |
| 8 | 8 | } |
| 9 | 9 | |
| 10 | 10 | test { |
| 11 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; // TODO | |
| 12 | ||
| 13 | 11 | const S = struct { |
| 14 | 12 | comptime x: i32 = 0, |
| 15 | 13 | comptime y: u32 = 0, |
test/behavior/bugs/11162.zig+2-3| ... | ... | @@ -2,9 +2,8 @@ const std = @import("std"); |
| 2 | 2 | const builtin = @import("builtin"); |
| 3 | 3 | const expect = std.testing.expect; |
| 4 | 4 | |
| 5 | test "aggregate initializers should allow initializing comptime fields, verifying equality (stage2 only)" { | |
| 6 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; // TODO | |
| 7 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 5 | test "aggregate initializers should allow initializing comptime fields, verifying equality" { | |
| 6 | if (true) return error.SkipZigTest; // TODO | |
| 8 | 7 | |
| 9 | 8 | var x: u32 = 15; |
| 10 | 9 | const T = @TypeOf(.{ @as(i32, -1234), @as(u32, 5678), x }); |
test/behavior/bugs/11227.zig-2| ... | ... | @@ -6,8 +6,6 @@ fn foo() u32 { |
| 6 | 6 | } |
| 7 | 7 | const bar = foo; |
| 8 | 8 | test "pointer to alias behaves same as pointer to function" { |
| 9 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; // stage1 has different function pointers | |
| 10 | ||
| 11 | 9 | var a = &bar; |
| 12 | 10 | try std.testing.expect(foo() == a()); |
| 13 | 11 | } |
test/behavior/bugs/11816.zig-1| ... | ... | @@ -3,7 +3,6 @@ const builtin = @import("builtin"); |
| 3 | 3 | |
| 4 | 4 | test { |
| 5 | 5 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 6 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 7 | 6 | |
| 8 | 7 | var x: u32 = 3; |
| 9 | 8 | const val: usize = while (true) switch (x) { |
test/behavior/bugs/12486.zig-2| ... | ... | @@ -23,8 +23,6 @@ const ErrStruct = struct { |
| 23 | 23 | }; |
| 24 | 24 | |
| 25 | 25 | test { |
| 26 | if (@import("builtin").zig_backend == .stage1) return error.SkipZigTest; | |
| 27 | ||
| 28 | 26 | _ = OptEnum{ |
| 29 | 27 | .opt_enum = .{ |
| 30 | 28 | .EnumVariant = 1, |
test/behavior/bugs/12723.zig-3| ... | ... | @@ -1,8 +1,5 @@ |
| 1 | 1 | const expect = @import("std").testing.expect; |
| 2 | 2 | |
| 3 | // This test causes a compile error on stage1 regardless of whether | |
| 4 | // the body of the test is comptime-gated or not. To workaround this, | |
| 5 | // we gate the inclusion of the test file. | |
| 6 | 3 | test "Non-exhaustive enum backed by comptime_int" { |
| 7 | 4 | const E = enum(comptime_int) { a, b, c, _ }; |
| 8 | 5 | comptime var e: E = .a; |
test/behavior/bugs/1277.zig-1| ... | ... | @@ -12,7 +12,6 @@ fn f() i32 { |
| 12 | 12 | } |
| 13 | 13 | |
| 14 | 14 | test "don't emit an LLVM global for a const function when it's in an optional in a struct" { |
| 15 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; // stage1 has different function pointers | |
| 16 | 15 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 17 | 16 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 18 | 17 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
test/behavior/bugs/12801-1.zig-1| ... | ... | @@ -8,7 +8,6 @@ fn capacity_() u64 { |
| 8 | 8 | |
| 9 | 9 | test { |
| 10 | 10 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 11 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 12 | 11 | |
| 13 | 12 | try std.testing.expect((@This(){}).capacity() == 64); |
| 14 | 13 | } |
test/behavior/bugs/12801-2.zig-1| ... | ... | @@ -14,7 +14,6 @@ const Auto = struct { |
| 14 | 14 | } |
| 15 | 15 | }; |
| 16 | 16 | test { |
| 17 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 18 | 17 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 19 | 18 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 20 | 19 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
test/behavior/bugs/12885.zig-2| ... | ... | @@ -11,8 +11,6 @@ const Foo = @Type(.{ |
| 11 | 11 | .ErrorSet = &info.args, |
| 12 | 12 | }); |
| 13 | 13 | test "ErrorSet comptime_field_ptr" { |
| 14 | if (@import("builtin").zig_backend == .stage1) return error.SkipZigTest; | |
| 15 | ||
| 16 | 14 | try expect(Foo == error{bar}); |
| 17 | 15 | } |
| 18 | 16 |
test/behavior/bugs/12891.zig-2| ... | ... | @@ -7,8 +7,6 @@ test "issue12891" { |
| 7 | 7 | try std.testing.expect(i < f); |
| 8 | 8 | } |
| 9 | 9 | test "nan" { |
| 10 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; // TODO | |
| 11 | ||
| 12 | 10 | const f = comptime std.math.nan(f64); |
| 13 | 11 | var i: usize = 0; |
| 14 | 12 | try std.testing.expect(!(f < i)); |
test/behavior/bugs/12911.zig-2| ... | ... | @@ -5,7 +5,5 @@ const Thing = struct { |
| 5 | 5 | array: [1]Item, |
| 6 | 6 | }; |
| 7 | 7 | test { |
| 8 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 9 | ||
| 10 | 8 | _ = Thing{ .array = undefined }; |
| 11 | 9 | } |
test/behavior/bugs/1310.zig+1-2| ... | ... | @@ -22,7 +22,6 @@ fn agent_callback(_vm: [*]VM, options: [*]u8) callconv(.C) i32 { |
| 22 | 22 | return 11; |
| 23 | 23 | } |
| 24 | 24 | |
| 25 | test "fixed" { | |
| 26 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 25 | test { | |
| 27 | 26 | try expect(agent_callback(undefined, undefined) == 11); |
| 28 | 27 | } |
test/behavior/bugs/2006.zig+1-8| ... | ... | @@ -9,12 +9,5 @@ test "bug 2006" { |
| 9 | 9 | var a: S = undefined; |
| 10 | 10 | a = S{ .p = undefined }; |
| 11 | 11 | try expect(@sizeOf(S) != 0); |
| 12 | if (@import("builtin").zig_backend != .stage1) { | |
| 13 | // It is an accepted proposal to make `@sizeOf` for pointers independent | |
| 14 | // of whether the element type is zero bits. | |
| 15 | // This language change has not been implemented in stage1. | |
| 16 | try expect(@sizeOf(*void) == @sizeOf(*i32)); | |
| 17 | } else { | |
| 18 | try expect(@sizeOf(*void) == 0); | |
| 19 | } | |
| 12 | try expect(@sizeOf(*void) == @sizeOf(*i32)); | |
| 20 | 13 | } |
test/behavior/bugs/3112.zig-1| ... | ... | @@ -13,7 +13,6 @@ fn prev(p: ?State) void { |
| 13 | 13 | |
| 14 | 14 | test "zig test crash" { |
| 15 | 15 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 16 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 17 | 16 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| 18 | 17 | var global: State = undefined; |
| 19 | 18 | global.enter = prev; |
test/behavior/bugs/3779.zig-3| ... | ... | @@ -6,7 +6,6 @@ const tag_name = @tagName(TestEnum.TestEnumValue); |
| 6 | 6 | const ptr_tag_name: [*:0]const u8 = tag_name; |
| 7 | 7 | |
| 8 | 8 | test "@tagName() returns a string literal" { |
| 9 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; // stage1 gets the type wrong | |
| 10 | 9 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 11 | 10 | |
| 12 | 11 | try std.testing.expect(*const [13:0]u8 == @TypeOf(tag_name)); |
| ... | ... | @@ -19,7 +18,6 @@ const error_name = @errorName(TestError.TestErrorCode); |
| 19 | 18 | const ptr_error_name: [*:0]const u8 = error_name; |
| 20 | 19 | |
| 21 | 20 | test "@errorName() returns a string literal" { |
| 22 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; // stage1 gets the type wrong | |
| 23 | 21 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 24 | 22 | |
| 25 | 23 | try std.testing.expect(*const [13:0]u8 == @TypeOf(error_name)); |
| ... | ... | @@ -32,7 +30,6 @@ const type_name = @typeName(TestType); |
| 32 | 30 | const ptr_type_name: [*:0]const u8 = type_name; |
| 33 | 31 | |
| 34 | 32 | test "@typeName() returns a string literal" { |
| 35 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; // stage1 gets the type wrong | |
| 36 | 33 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 37 | 34 | |
| 38 | 35 | try std.testing.expect(*const [type_name.len:0]u8 == @TypeOf(type_name)); |
test/behavior/bugs/6850.zig+1-7| ... | ... | @@ -8,11 +8,5 @@ test "lazy sizeof comparison with zero" { |
| 8 | 8 | } |
| 9 | 9 | |
| 10 | 10 | fn hasNoBits(comptime T: type) bool { |
| 11 | if (@import("builtin").zig_backend != .stage1) { | |
| 12 | // It is an accepted proposal to make `@sizeOf` for pointers independent | |
| 13 | // of whether the element type is zero bits. | |
| 14 | // This language change has not been implemented in stage1. | |
| 15 | return @sizeOf(T) == @sizeOf(*i32); | |
| 16 | } | |
| 17 | return @sizeOf(T) == 0; | |
| 11 | return @sizeOf(T) == @sizeOf(*i32); | |
| 18 | 12 | } |
test/behavior/bugs/920.zig+2-11| ... | ... | @@ -2,23 +2,14 @@ const builtin = @import("builtin"); |
| 2 | 2 | const std = @import("std"); |
| 3 | 3 | const Random = std.rand.Random; |
| 4 | 4 | |
| 5 | const zeroCaseFn = switch (builtin.zig_backend) { | |
| 6 | .stage1 => fn (*Random, f64) f64, | |
| 7 | else => *const fn (*Random, f64) f64, | |
| 8 | }; | |
| 9 | const pdfFn = switch (builtin.zig_backend) { | |
| 10 | .stage1 => fn (f64) f64, | |
| 11 | else => *const fn (f64) f64, | |
| 12 | }; | |
| 13 | ||
| 14 | 5 | const ZigTable = struct { |
| 15 | 6 | r: f64, |
| 16 | 7 | x: [257]f64, |
| 17 | 8 | f: [257]f64, |
| 18 | 9 | |
| 19 | pdf: pdfFn, | |
| 10 | pdf: *const fn (f64) f64, | |
| 20 | 11 | is_symmetric: bool, |
| 21 | zero_case: zeroCaseFn, | |
| 12 | zero_case: *const fn (*Random, f64) f64, | |
| 22 | 13 | }; |
| 23 | 14 | |
| 24 | 15 | fn ZigTableGen(comptime is_symmetric: bool, comptime r: f64, comptime v: f64, comptime f: fn (f64) f64, comptime f_inv: fn (f64) f64, comptime zero_case: fn (*Random, f64) f64) ZigTable { |
test/behavior/byteswap.zig-5| ... | ... | @@ -3,7 +3,6 @@ const builtin = @import("builtin"); |
| 3 | 3 | const expect = std.testing.expect; |
| 4 | 4 | |
| 5 | 5 | test "@byteSwap integers" { |
| 6 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 7 | 6 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; |
| 8 | 7 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| 9 | 8 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| ... | ... | @@ -62,7 +61,6 @@ fn vector8() !void { |
| 62 | 61 | } |
| 63 | 62 | |
| 64 | 63 | test "@byteSwap vectors u8" { |
| 65 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 66 | 64 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; |
| 67 | 65 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; |
| 68 | 66 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| ... | ... | @@ -81,7 +79,6 @@ fn vector16() !void { |
| 81 | 79 | } |
| 82 | 80 | |
| 83 | 81 | test "@byteSwap vectors u16" { |
| 84 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 85 | 82 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; |
| 86 | 83 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; |
| 87 | 84 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| ... | ... | @@ -100,7 +97,6 @@ fn vector24() !void { |
| 100 | 97 | } |
| 101 | 98 | |
| 102 | 99 | test "@byteSwap vectors u24" { |
| 103 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 104 | 100 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; |
| 105 | 101 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; |
| 106 | 102 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| ... | ... | @@ -119,7 +115,6 @@ fn vector0() !void { |
| 119 | 115 | } |
| 120 | 116 | |
| 121 | 117 | test "@byteSwap vectors u0" { |
| 122 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 123 | 118 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; |
| 124 | 119 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| 125 | 120 |
test/behavior/call.zig+4-10| ... | ... | @@ -45,10 +45,7 @@ test "basic invocations" { |
| 45 | 45 | } |
| 46 | 46 | { |
| 47 | 47 | // call of non comptime-known function |
| 48 | var alias_foo = switch (builtin.zig_backend) { | |
| 49 | .stage1 => foo, | |
| 50 | else => &foo, | |
| 51 | }; | |
| 48 | var alias_foo = &foo; | |
| 52 | 49 | try expect(@call(.{ .modifier = .no_async }, alias_foo, .{}) == 1234); |
| 53 | 50 | try expect(@call(.{ .modifier = .never_tail }, alias_foo, .{}) == 1234); |
| 54 | 51 | try expect(@call(.{ .modifier = .never_inline }, alias_foo, .{}) == 1234); |
| ... | ... | @@ -71,7 +68,9 @@ test "tuple parameters" { |
| 71 | 68 | try expect(@call(.{}, add, .{ 12, b }) == 46); |
| 72 | 69 | try expect(@call(.{}, add, .{ a, b }) == 46); |
| 73 | 70 | try expect(@call(.{}, add, .{ 12, 34 }) == 46); |
| 74 | if (builtin.zig_backend == .stage1) comptime try expect(@call(.{}, add, .{ 12, 34 }) == 46); // TODO | |
| 71 | if (false) { | |
| 72 | comptime try expect(@call(.{}, add, .{ 12, 34 }) == 46); // TODO | |
| 73 | } | |
| 75 | 74 | try expect(comptime @call(.{}, add, .{ 12, 34 }) == 46); |
| 76 | 75 | { |
| 77 | 76 | const separate_args0 = .{ a, b }; |
| ... | ... | @@ -246,8 +245,6 @@ test "function call with 40 arguments" { |
| 246 | 245 | } |
| 247 | 246 | |
| 248 | 247 | test "arguments to comptime parameters generated in comptime blocks" { |
| 249 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 250 | ||
| 251 | 248 | const S = struct { |
| 252 | 249 | fn fortyTwo() i32 { |
| 253 | 250 | return 42; |
| ... | ... | @@ -261,7 +258,6 @@ test "arguments to comptime parameters generated in comptime blocks" { |
| 261 | 258 | } |
| 262 | 259 | |
| 263 | 260 | test "forced tail call" { |
| 264 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 265 | 261 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 266 | 262 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 267 | 263 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO |
| ... | ... | @@ -294,7 +290,6 @@ test "forced tail call" { |
| 294 | 290 | } |
| 295 | 291 | |
| 296 | 292 | test "inline call preserves tail call" { |
| 297 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 298 | 293 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 299 | 294 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 300 | 295 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO |
| ... | ... | @@ -329,7 +324,6 @@ test "inline call preserves tail call" { |
| 329 | 324 | } |
| 330 | 325 | |
| 331 | 326 | test "inline call doesn't re-evaluate non generic struct" { |
| 332 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 333 | 327 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 334 | 328 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 335 | 329 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
test/behavior/cast.zig-15| ... | ... | @@ -113,8 +113,6 @@ test "@intToFloat" { |
| 113 | 113 | } |
| 114 | 114 | |
| 115 | 115 | test "@intToFloat(f80)" { |
| 116 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 117 | ||
| 118 | 116 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 119 | 117 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 120 | 118 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| ... | ... | @@ -699,11 +697,6 @@ test "peer type resolution: error set supersets" { |
| 699 | 697 | } |
| 700 | 698 | |
| 701 | 699 | test "peer type resolution: disjoint error sets" { |
| 702 | if (builtin.zig_backend == .stage1) { | |
| 703 | // stage1 gets the order of the error names wrong after merging the sets. | |
| 704 | return error.SkipZigTest; | |
| 705 | } | |
| 706 | ||
| 707 | 700 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 708 | 701 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 709 | 702 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| ... | ... | @@ -733,11 +726,6 @@ test "peer type resolution: disjoint error sets" { |
| 733 | 726 | } |
| 734 | 727 | |
| 735 | 728 | test "peer type resolution: error union and error set" { |
| 736 | if (builtin.zig_backend == .stage1) { | |
| 737 | // stage1 gets the order of the error names wrong after merging the sets. | |
| 738 | return error.SkipZigTest; | |
| 739 | } | |
| 740 | ||
| 741 | 729 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 742 | 730 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 743 | 731 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| ... | ... | @@ -1080,7 +1068,6 @@ fn incrementVoidPtrArray(array: ?*anyopaque, len: usize) void { |
| 1080 | 1068 | } |
| 1081 | 1069 | |
| 1082 | 1070 | test "compile time int to ptr of function" { |
| 1083 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 1084 | 1071 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 1085 | 1072 | |
| 1086 | 1073 | try foobar(FUNCTION_CONSTANT); |
| ... | ... | @@ -1421,8 +1408,6 @@ test "floatToInt to zero-bit int" { |
| 1421 | 1408 | } |
| 1422 | 1409 | |
| 1423 | 1410 | test "peer type resolution of function pointer and function body" { |
| 1424 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 1425 | ||
| 1426 | 1411 | const T = fn () u32; |
| 1427 | 1412 | const a: T = undefined; |
| 1428 | 1413 | const b: *const T = undefined; |
test/behavior/comptime_memory.zig+11-32| ... | ... | @@ -4,8 +4,6 @@ const testing = @import("std").testing; |
| 4 | 4 | const ptr_size = @sizeOf(usize); |
| 5 | 5 | |
| 6 | 6 | test "type pun signed and unsigned as single pointer" { |
| 7 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 8 | ||
| 9 | 7 | comptime { |
| 10 | 8 | var x: u32 = 0; |
| 11 | 9 | const y = @ptrCast(*i32, &x); |
| ... | ... | @@ -15,8 +13,6 @@ test "type pun signed and unsigned as single pointer" { |
| 15 | 13 | } |
| 16 | 14 | |
| 17 | 15 | test "type pun signed and unsigned as many pointer" { |
| 18 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 19 | ||
| 20 | 16 | comptime { |
| 21 | 17 | var x: u32 = 0; |
| 22 | 18 | const y = @ptrCast([*]i32, &x); |
| ... | ... | @@ -26,8 +22,6 @@ test "type pun signed and unsigned as many pointer" { |
| 26 | 22 | } |
| 27 | 23 | |
| 28 | 24 | test "type pun signed and unsigned as array pointer" { |
| 29 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 30 | ||
| 31 | 25 | comptime { |
| 32 | 26 | var x: u32 = 0; |
| 33 | 27 | const y = @ptrCast(*[1]i32, &x); |
| ... | ... | @@ -37,8 +31,7 @@ test "type pun signed and unsigned as array pointer" { |
| 37 | 31 | } |
| 38 | 32 | |
| 39 | 33 | test "type pun signed and unsigned as offset many pointer" { |
| 40 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 41 | if (builtin.zig_backend != .stage1) { | |
| 34 | if (true) { | |
| 42 | 35 | // TODO https://github.com/ziglang/zig/issues/9646 |
| 43 | 36 | return error.SkipZigTest; |
| 44 | 37 | } |
| ... | ... | @@ -53,8 +46,7 @@ test "type pun signed and unsigned as offset many pointer" { |
| 53 | 46 | } |
| 54 | 47 | |
| 55 | 48 | test "type pun signed and unsigned as array pointer" { |
| 56 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 57 | if (builtin.zig_backend != .stage1) { | |
| 49 | if (true) { | |
| 58 | 50 | // TODO https://github.com/ziglang/zig/issues/9646 |
| 59 | 51 | return error.SkipZigTest; |
| 60 | 52 | } |
| ... | ... | @@ -69,8 +61,6 @@ test "type pun signed and unsigned as array pointer" { |
| 69 | 61 | } |
| 70 | 62 | |
| 71 | 63 | test "type pun value and struct" { |
| 72 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 73 | ||
| 74 | 64 | comptime { |
| 75 | 65 | const StructOfU32 = extern struct { x: u32 }; |
| 76 | 66 | var inst: StructOfU32 = .{ .x = 0 }; |
| ... | ... | @@ -85,7 +75,6 @@ fn bigToNativeEndian(comptime T: type, v: T) T { |
| 85 | 75 | return if (endian == .Big) v else @byteSwap(v); |
| 86 | 76 | } |
| 87 | 77 | test "type pun endianness" { |
| 88 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 89 | 78 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 90 | 79 | |
| 91 | 80 | comptime { |
| ... | ... | @@ -179,8 +168,7 @@ fn doTypePunBitsTest(as_bits: *Bits) !void { |
| 179 | 168 | } |
| 180 | 169 | |
| 181 | 170 | test "type pun bits" { |
| 182 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 183 | if (builtin.zig_backend != .stage1) { | |
| 171 | if (true) { | |
| 184 | 172 | // TODO https://github.com/ziglang/zig/issues/9646 |
| 185 | 173 | return error.SkipZigTest; |
| 186 | 174 | } |
| ... | ... | @@ -197,8 +185,7 @@ const imports = struct { |
| 197 | 185 | |
| 198 | 186 | // Make sure lazy values work on their own, before getting into more complex tests |
| 199 | 187 | test "basic pointer preservation" { |
| 200 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 201 | if (builtin.zig_backend != .stage1) { | |
| 188 | if (true) { | |
| 202 | 189 | // TODO https://github.com/ziglang/zig/issues/9646 |
| 203 | 190 | return error.SkipZigTest; |
| 204 | 191 | } |
| ... | ... | @@ -211,8 +198,7 @@ test "basic pointer preservation" { |
| 211 | 198 | } |
| 212 | 199 | |
| 213 | 200 | test "byte copy preserves linker value" { |
| 214 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 215 | if (builtin.zig_backend != .stage1) { | |
| 201 | if (true) { | |
| 216 | 202 | // TODO https://github.com/ziglang/zig/issues/9646 |
| 217 | 203 | return error.SkipZigTest; |
| 218 | 204 | } |
| ... | ... | @@ -235,8 +221,7 @@ test "byte copy preserves linker value" { |
| 235 | 221 | } |
| 236 | 222 | |
| 237 | 223 | test "unordered byte copy preserves linker value" { |
| 238 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 239 | if (builtin.zig_backend != .stage1) { | |
| 224 | if (true) { | |
| 240 | 225 | // TODO https://github.com/ziglang/zig/issues/9646 |
| 241 | 226 | return error.SkipZigTest; |
| 242 | 227 | } |
| ... | ... | @@ -260,8 +245,7 @@ test "unordered byte copy preserves linker value" { |
| 260 | 245 | } |
| 261 | 246 | |
| 262 | 247 | test "shuffle chunks of linker value" { |
| 263 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 264 | if (builtin.zig_backend != .stage1) { | |
| 248 | if (true) { | |
| 265 | 249 | // TODO https://github.com/ziglang/zig/issues/9646 |
| 266 | 250 | return error.SkipZigTest; |
| 267 | 251 | } |
| ... | ... | @@ -279,8 +263,7 @@ test "shuffle chunks of linker value" { |
| 279 | 263 | } |
| 280 | 264 | |
| 281 | 265 | test "dance on linker values" { |
| 282 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 283 | if (builtin.zig_backend != .stage1) { | |
| 266 | if (true) { | |
| 284 | 267 | // TODO https://github.com/ziglang/zig/issues/9646 |
| 285 | 268 | return error.SkipZigTest; |
| 286 | 269 | } |
| ... | ... | @@ -311,8 +294,7 @@ test "dance on linker values" { |
| 311 | 294 | } |
| 312 | 295 | |
| 313 | 296 | test "offset array ptr by element size" { |
| 314 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 315 | if (builtin.zig_backend != .stage1) { | |
| 297 | if (true) { | |
| 316 | 298 | // TODO https://github.com/ziglang/zig/issues/9646 |
| 317 | 299 | return error.SkipZigTest; |
| 318 | 300 | } |
| ... | ... | @@ -339,8 +321,7 @@ test "offset array ptr by element size" { |
| 339 | 321 | } |
| 340 | 322 | |
| 341 | 323 | test "offset instance by field size" { |
| 342 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 343 | if (builtin.zig_backend != .stage1) { | |
| 324 | if (true) { | |
| 344 | 325 | // TODO https://github.com/ziglang/zig/issues/9646 |
| 345 | 326 | return error.SkipZigTest; |
| 346 | 327 | } |
| ... | ... | @@ -365,8 +346,7 @@ test "offset instance by field size" { |
| 365 | 346 | } |
| 366 | 347 | |
| 367 | 348 | test "offset field ptr by enclosing array element size" { |
| 368 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 369 | if (builtin.zig_backend != .stage1) { | |
| 349 | if (true) { | |
| 370 | 350 | // TODO https://github.com/ziglang/zig/issues/9646 |
| 371 | 351 | return error.SkipZigTest; |
| 372 | 352 | } |
| ... | ... | @@ -395,7 +375,6 @@ test "offset field ptr by enclosing array element size" { |
| 395 | 375 | } |
| 396 | 376 | |
| 397 | 377 | test "accessing reinterpreted memory of parent object" { |
| 398 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 399 | 378 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 400 | 379 | const S = extern struct { |
| 401 | 380 | a: f32, |
test/behavior/error.zig-15| ... | ... | @@ -151,7 +151,6 @@ test "fn returning empty error set can be passed as fn returning any error" { |
| 151 | 151 | } |
| 152 | 152 | |
| 153 | 153 | test "fn returning empty error set can be passed as fn returning any error - pointer" { |
| 154 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 155 | 154 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 156 | 155 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 157 | 156 | |
| ... | ... | @@ -465,11 +464,6 @@ test "nested catch" { |
| 465 | 464 | } |
| 466 | 465 | |
| 467 | 466 | test "function pointer with return type that is error union with payload which is pointer of parent struct" { |
| 468 | if (builtin.zig_backend == .stage1) { | |
| 469 | // stage1 has wrong function pointer semantics | |
| 470 | return error.SkipZigTest; | |
| 471 | } | |
| 472 | ||
| 473 | 467 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 474 | 468 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 475 | 469 | |
| ... | ... | @@ -582,9 +576,6 @@ pub fn testBuiltinErrorName(err: anyerror) [:0]const u8 { |
| 582 | 576 | } |
| 583 | 577 | |
| 584 | 578 | test "error set equality" { |
| 585 | // This tests using stage2 logic (#11022) | |
| 586 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 587 | ||
| 588 | 579 | const a = error{One}; |
| 589 | 580 | const b = error{One}; |
| 590 | 581 | |
| ... | ... | @@ -752,7 +743,6 @@ const NoReturn = struct { |
| 752 | 743 | }; |
| 753 | 744 | |
| 754 | 745 | test "error union of noreturn used with if" { |
| 755 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 756 | 746 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 757 | 747 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 758 | 748 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
| ... | ... | @@ -767,7 +757,6 @@ test "error union of noreturn used with if" { |
| 767 | 757 | } |
| 768 | 758 | |
| 769 | 759 | test "error union of noreturn used with try" { |
| 770 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 771 | 760 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 772 | 761 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 773 | 762 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
| ... | ... | @@ -779,7 +768,6 @@ test "error union of noreturn used with try" { |
| 779 | 768 | } |
| 780 | 769 | |
| 781 | 770 | test "error union of noreturn used with catch" { |
| 782 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 783 | 771 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 784 | 772 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 785 | 773 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
| ... | ... | @@ -807,7 +795,6 @@ test "alignment of wrapping an error union payload" { |
| 807 | 795 | } |
| 808 | 796 | |
| 809 | 797 | test "compare error union and error set" { |
| 810 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 811 | 798 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 812 | 799 | |
| 813 | 800 | var a: anyerror = error.Foo; |
| ... | ... | @@ -857,8 +844,6 @@ test "error from comptime string" { |
| 857 | 844 | } |
| 858 | 845 | |
| 859 | 846 | test "field access of anyerror results in smaller error set" { |
| 860 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 861 | ||
| 862 | 847 | const E1 = @TypeOf(error.Foo); |
| 863 | 848 | try expect(@TypeOf(E1.Foo) == E1); |
| 864 | 849 | const E2 = error{ A, B, C }; |
test/behavior/eval.zig+9-21| ... | ... | @@ -606,15 +606,16 @@ fn assertEqualPtrs(ptr1: *const u8, ptr2: *const u8) !void { |
| 606 | 606 | |
| 607 | 607 | // This one is still up for debate in the language specification. |
| 608 | 608 | // Application code should not rely on this behavior until it is solidified. |
| 609 | // Currently, stage1 has special case code to make this pass for string literals | |
| 610 | // but it does not work if the values are constructed with comptime code, or if | |
| 609 | // Historically, stage1 had special case code to make this pass for string literals | |
| 610 | // but it did not work if the values are constructed with comptime code, or if | |
| 611 | 611 | // arrays of non-u8 elements are used instead. |
| 612 | 612 | // The official language specification might not make this guarantee. However, if |
| 613 | 613 | // it does make this guarantee, it will make it consistently for all types, not |
| 614 | // only string literals. This is why stage2 currently has a string table for | |
| 615 | // string literals, to match stage1 and pass this test, however the end-game once | |
| 616 | // the lang spec issue is settled would be to use a global InternPool for comptime | |
| 617 | // memoized objects, making this behavior consistent across all types. | |
| 614 | // only string literals. This is why Zig currently has a string table for | |
| 615 | // string literals, to match legacy stage1 behavior and pass this test, however | |
| 616 | // the end-game once the lang spec issue is settled would be to use a global | |
| 617 | // InternPool for comptime memoized objects, making this behavior consistent | |
| 618 | // across all types. | |
| 618 | 619 | test "string literal used as comptime slice is memoized" { |
| 619 | 620 | const a = "link"; |
| 620 | 621 | const b = "link"; |
| ... | ... | @@ -742,7 +743,6 @@ fn scalar(x: u32) u32 { |
| 742 | 743 | } |
| 743 | 744 | |
| 744 | 745 | test "array concatenation peer resolves element types - value" { |
| 745 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 746 | 746 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| 747 | 747 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 748 | 748 | |
| ... | ... | @@ -758,7 +758,6 @@ test "array concatenation peer resolves element types - value" { |
| 758 | 758 | } |
| 759 | 759 | |
| 760 | 760 | test "array concatenation peer resolves element types - pointer" { |
| 761 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 762 | 761 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| 763 | 762 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 764 | 763 | |
| ... | ... | @@ -774,7 +773,6 @@ test "array concatenation peer resolves element types - pointer" { |
| 774 | 773 | } |
| 775 | 774 | |
| 776 | 775 | test "array concatenation sets the sentinel - value" { |
| 777 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 778 | 776 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; |
| 779 | 777 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| 780 | 778 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| ... | ... | @@ -794,7 +792,6 @@ test "array concatenation sets the sentinel - value" { |
| 794 | 792 | } |
| 795 | 793 | |
| 796 | 794 | test "array concatenation sets the sentinel - pointer" { |
| 797 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 798 | 795 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 799 | 796 | |
| 800 | 797 | var a = [2]u3{ 1, 7 }; |
| ... | ... | @@ -811,7 +808,6 @@ test "array concatenation sets the sentinel - pointer" { |
| 811 | 808 | } |
| 812 | 809 | |
| 813 | 810 | test "array multiplication sets the sentinel - value" { |
| 814 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 815 | 811 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; |
| 816 | 812 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| 817 | 813 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| ... | ... | @@ -829,7 +825,6 @@ test "array multiplication sets the sentinel - value" { |
| 829 | 825 | } |
| 830 | 826 | |
| 831 | 827 | test "array multiplication sets the sentinel - pointer" { |
| 832 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 833 | 828 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| 834 | 829 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 835 | 830 | |
| ... | ... | @@ -894,8 +889,6 @@ test "const type-annotated local initialized with function call has correct type |
| 894 | 889 | } |
| 895 | 890 | |
| 896 | 891 | test "comptime pointer load through elem_ptr" { |
| 897 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; // stage1 fails this test | |
| 898 | ||
| 899 | 892 | const S = struct { |
| 900 | 893 | x: usize, |
| 901 | 894 | }; |
| ... | ... | @@ -1038,7 +1031,6 @@ test "comptime break operand passing through runtime condition converted to runt |
| 1038 | 1031 | } |
| 1039 | 1032 | |
| 1040 | 1033 | test "comptime break operand passing through runtime switch converted to runtime break" { |
| 1041 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 1042 | 1034 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 1043 | 1035 | |
| 1044 | 1036 | const S = struct { |
| ... | ... | @@ -1294,8 +1286,6 @@ test "repeated value is correctly expanded" { |
| 1294 | 1286 | } |
| 1295 | 1287 | |
| 1296 | 1288 | test "value in if block is comptime-known" { |
| 1297 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 1298 | ||
| 1299 | 1289 | const first = blk: { |
| 1300 | 1290 | const s = if (false) "a" else "b"; |
| 1301 | 1291 | break :blk "foo" ++ s; |
| ... | ... | @@ -1330,8 +1320,6 @@ test "lazy value is resolved as slice operand" { |
| 1330 | 1320 | } |
| 1331 | 1321 | |
| 1332 | 1322 | test "break from inline loop depends on runtime condition" { |
| 1333 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 1334 | ||
| 1335 | 1323 | const S = struct { |
| 1336 | 1324 | fn foo(a: u8) bool { |
| 1337 | 1325 | return a == 4; |
| ... | ... | @@ -1405,7 +1393,7 @@ test "length of global array is determinable at comptime" { |
| 1405 | 1393 | |
| 1406 | 1394 | test "continue nested inline for loop" { |
| 1407 | 1395 | // TODO: https://github.com/ziglang/zig/issues/13175 |
| 1408 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; | |
| 1396 | if (true) return error.SkipZigTest; | |
| 1409 | 1397 | |
| 1410 | 1398 | var a: u8 = 0; |
| 1411 | 1399 | loop: inline for ([_]u8{ 1, 2 }) |x| { |
| ... | ... | @@ -1422,7 +1410,7 @@ test "continue nested inline for loop" { |
| 1422 | 1410 | |
| 1423 | 1411 | test "continue nested inline for loop in named block expr" { |
| 1424 | 1412 | // TODO: https://github.com/ziglang/zig/issues/13175 |
| 1425 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; | |
| 1413 | if (true) return error.SkipZigTest; | |
| 1426 | 1414 | |
| 1427 | 1415 | var a: u8 = 0; |
| 1428 | 1416 | loop: inline for ([_]u8{ 1, 2 }) |x| { |
test/behavior/floatop.zig+1-15| ... | ... | @@ -114,7 +114,7 @@ fn testSqrt() !void { |
| 114 | 114 | try expect(math.approxEqAbs(f32, @sqrt(@as(f32, 1.1)), 1.0488088481701516, epsilon)); |
| 115 | 115 | try expect(math.approxEqAbs(f32, @sqrt(@as(f32, 2.0)), 1.4142135623730950, epsilon)); |
| 116 | 116 | |
| 117 | if (builtin.zig_backend == .stage1) { | |
| 117 | if (false) { | |
| 118 | 118 | if (has_f80_rt) { |
| 119 | 119 | // TODO https://github.com/ziglang/zig/issues/10875 |
| 120 | 120 | if (builtin.os.tag != .freebsd) { |
| ... | ... | @@ -181,10 +181,6 @@ test "more @sqrt f16 tests" { |
| 181 | 181 | } |
| 182 | 182 | |
| 183 | 183 | test "@sin" { |
| 184 | if (builtin.zig_backend == .stage1) { | |
| 185 | // stage1 emits an incorrect compile error for `@as(ty, std.math.pi / 2)` | |
| 186 | return error.SkipZigTest; | |
| 187 | } | |
| 188 | 184 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
| 189 | 185 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 190 | 186 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| ... | ... | @@ -205,7 +201,6 @@ fn testSin() !void { |
| 205 | 201 | } |
| 206 | 202 | |
| 207 | 203 | test "@sin with vectors" { |
| 208 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 209 | 204 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
| 210 | 205 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO |
| 211 | 206 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| ... | ... | @@ -226,10 +221,6 @@ fn testSinWithVectors() !void { |
| 226 | 221 | } |
| 227 | 222 | |
| 228 | 223 | test "@cos" { |
| 229 | if (builtin.zig_backend == .stage1) { | |
| 230 | // stage1 emits an incorrect compile error for `@as(ty, std.math.pi / 2)` | |
| 231 | return error.SkipZigTest; | |
| 232 | } | |
| 233 | 224 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
| 234 | 225 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 235 | 226 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| ... | ... | @@ -250,7 +241,6 @@ fn testCos() !void { |
| 250 | 241 | } |
| 251 | 242 | |
| 252 | 243 | test "@cos with vectors" { |
| 253 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 254 | 244 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
| 255 | 245 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO |
| 256 | 246 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| ... | ... | @@ -781,7 +771,6 @@ test "f128 at compile time is lossy" { |
| 781 | 771 | } |
| 782 | 772 | |
| 783 | 773 | test "comptime fixed-width float zero divided by zero produces NaN" { |
| 784 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 785 | 774 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
| 786 | 775 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 787 | 776 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| ... | ... | @@ -793,7 +782,6 @@ test "comptime fixed-width float zero divided by zero produces NaN" { |
| 793 | 782 | } |
| 794 | 783 | |
| 795 | 784 | test "comptime fixed-width float non-zero divided by zero produces signed Inf" { |
| 796 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 797 | 785 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
| 798 | 786 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 799 | 787 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| ... | ... | @@ -810,8 +798,6 @@ test "comptime fixed-width float non-zero divided by zero produces signed Inf" { |
| 810 | 798 | } |
| 811 | 799 | |
| 812 | 800 | test "comptime_float zero divided by zero produces zero" { |
| 813 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 814 | ||
| 815 | 801 | try expect((0.0 / 0.0) == 0.0); |
| 816 | 802 | } |
| 817 | 803 |
test/behavior/fn.zig-10| ... | ... | @@ -68,8 +68,6 @@ fn outer(y: u32) *const fn (u32) u32 { |
| 68 | 68 | } |
| 69 | 69 | |
| 70 | 70 | test "return inner function which references comptime variable of outer function" { |
| 71 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 72 | ||
| 73 | 71 | var func = outer(10); |
| 74 | 72 | try expect(func(3) == 7); |
| 75 | 73 | } |
| ... | ... | @@ -97,7 +95,6 @@ test "discard the result of a function that returns a struct" { |
| 97 | 95 | } |
| 98 | 96 | |
| 99 | 97 | test "inline function call that calls optional function pointer, return pointer at callsite interacts correctly with callsite return type" { |
| 100 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 101 | 98 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| 102 | 99 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| 103 | 100 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| ... | ... | @@ -145,7 +142,6 @@ fn fnWithUnreachable() noreturn { |
| 145 | 142 | } |
| 146 | 143 | |
| 147 | 144 | test "extern struct with stdcallcc fn pointer" { |
| 148 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 149 | 145 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| 150 | 146 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 151 | 147 | |
| ... | ... | @@ -293,11 +289,6 @@ fn acceptsString(foo: []u8) void { |
| 293 | 289 | } |
| 294 | 290 | |
| 295 | 291 | test "function pointers" { |
| 296 | if (builtin.zig_backend == .stage1) { | |
| 297 | // stage1 has wrong semantics for function pointers | |
| 298 | return error.SkipZigTest; | |
| 299 | } | |
| 300 | ||
| 301 | 292 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 302 | 293 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 303 | 294 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| ... | ... | @@ -415,7 +406,6 @@ test "import passed byref to function in return type" { |
| 415 | 406 | } |
| 416 | 407 | |
| 417 | 408 | test "implicit cast function to function ptr" { |
| 418 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 419 | 409 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 420 | 410 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 421 | 411 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
test/behavior/generics.zig+2-4| ... | ... | @@ -21,8 +21,8 @@ test "simple generic fn" { |
| 21 | 21 | |
| 22 | 22 | try expect(max(i32, 3, -1) == 3); |
| 23 | 23 | try expect(max(u8, 1, 100) == 100); |
| 24 | if (builtin.zig_backend == .stage1) { | |
| 25 | // TODO: stage2 is incorrectly emitting the following: | |
| 24 | if (false) { | |
| 25 | // TODO: zig is incorrectly emitting the following: | |
| 26 | 26 | // error: cast of value 1.23e-01 to type 'f32' loses information |
| 27 | 27 | try expect(max(f32, 0.123, 0.456) == 0.456); |
| 28 | 28 | } |
| ... | ... | @@ -342,8 +342,6 @@ test "generic instantiation of tagged union with only one field" { |
| 342 | 342 | } |
| 343 | 343 | |
| 344 | 344 | test "nested generic function" { |
| 345 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 346 | ||
| 347 | 345 | const S = struct { |
| 348 | 346 | fn foo(comptime T: type, callback: *const fn (user_data: T) anyerror!void, data: T) anyerror!void { |
| 349 | 347 | try callback(data); |
test/behavior/int128.zig+2-2| ... | ... | @@ -29,8 +29,8 @@ test "undefined 128 bit int" { |
| 29 | 29 | |
| 30 | 30 | @setRuntimeSafety(true); |
| 31 | 31 | |
| 32 | // TODO implement @setRuntimeSafety in stage2 | |
| 33 | if (builtin.zig_backend != .stage1 and builtin.mode != .Debug and builtin.mode != .ReleaseSafe) { | |
| 32 | // TODO implement @setRuntimeSafety | |
| 33 | if (builtin.mode != .Debug and builtin.mode != .ReleaseSafe) { | |
| 34 | 34 | return error.SkipZigTest; |
| 35 | 35 | } |
| 36 | 36 |
test/behavior/inttoptr.zig-2| ... | ... | @@ -1,8 +1,6 @@ |
| 1 | 1 | const builtin = @import("builtin"); |
| 2 | 2 | |
| 3 | 3 | test "casting integer address to function pointer" { |
| 4 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 5 | ||
| 6 | 4 | addressToFunction(); |
| 7 | 5 | comptime addressToFunction(); |
| 8 | 6 | } |
test/behavior/math.zig+4-13| ... | ... | @@ -94,7 +94,6 @@ fn testOneClz(comptime T: type, x: T) u32 { |
| 94 | 94 | } |
| 95 | 95 | |
| 96 | 96 | test "@clz vectors" { |
| 97 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 98 | 97 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
| 99 | 98 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 100 | 99 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| ... | ... | @@ -156,7 +155,6 @@ fn testOneCtz(comptime T: type, x: T) u32 { |
| 156 | 155 | } |
| 157 | 156 | |
| 158 | 157 | test "@ctz vectors" { |
| 159 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 160 | 158 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
| 161 | 159 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 162 | 160 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| ... | ... | @@ -971,8 +969,6 @@ test "overflow arithmetic with u0 values" { |
| 971 | 969 | } |
| 972 | 970 | |
| 973 | 971 | test "allow signed integer division/remainder when values are comptime-known and positive or exact" { |
| 974 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 975 | ||
| 976 | 972 | try expect(5 / 3 == 1); |
| 977 | 973 | try expect(-5 / -3 == 1); |
| 978 | 974 | try expect(-6 / 3 == -2); |
| ... | ... | @@ -1009,14 +1005,8 @@ test "quad hex float literal parsing accurate" { |
| 1009 | 1005 | try expect(@bitCast(u128, f) == 0x40042eab345678439abcdefea5678234); |
| 1010 | 1006 | } |
| 1011 | 1007 | { |
| 1012 | // TODO: modify stage1/parse_f128.c to use round-to-even | |
| 1013 | if (builtin.zig_backend == .stage1) { | |
| 1014 | var f: f128 = 0x1.edcb34a235253948765432134674fp-1; | |
| 1015 | try expect(@bitCast(u128, f) == 0x3ffeedcb34a235253948765432134674); // round-down | |
| 1016 | } else { | |
| 1017 | var f: f128 = 0x1.edcb34a235253948765432134674fp-1; | |
| 1018 | try expect(@bitCast(u128, f) == 0x3ffeedcb34a235253948765432134675); // round-to-even | |
| 1019 | } | |
| 1008 | var f: f128 = 0x1.edcb34a235253948765432134674fp-1; | |
| 1009 | try expect(@bitCast(u128, f) == 0x3ffeedcb34a235253948765432134675); // round-to-even | |
| 1020 | 1010 | } |
| 1021 | 1011 | { |
| 1022 | 1012 | var f: f128 = 0x1.353e45674d89abacc3a2ebf3ff4ffp-50; |
| ... | ... | @@ -1270,7 +1260,8 @@ test "@sqrt" { |
| 1270 | 1260 | try testSqrt(f16, 13.0); |
| 1271 | 1261 | comptime try testSqrt(f16, 13.0); |
| 1272 | 1262 | |
| 1273 | if (builtin.zig_backend == .stage1) { | |
| 1263 | // TODO: make this pass | |
| 1264 | if (false) { | |
| 1274 | 1265 | const x = 14.0; |
| 1275 | 1266 | const y = x * x; |
| 1276 | 1267 | const z = @sqrt(y); |
test/behavior/member_func.zig-2| ... | ... | @@ -27,7 +27,6 @@ const HasFuncs = struct { |
| 27 | 27 | }; |
| 28 | 28 | |
| 29 | 29 | test "standard field calls" { |
| 30 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 31 | 30 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| 32 | 31 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| 33 | 32 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| ... | ... | @@ -71,7 +70,6 @@ test "standard field calls" { |
| 71 | 70 | } |
| 72 | 71 | |
| 73 | 72 | test "@field field calls" { |
| 74 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 75 | 73 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| 76 | 74 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| 77 | 75 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
test/behavior/muladd.zig-6| ... | ... | @@ -47,7 +47,6 @@ test "@mulAdd f80" { |
| 47 | 47 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 48 | 48 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 49 | 49 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 50 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 51 | 50 | if (builtin.zig_backend == .stage2_llvm and builtin.os.tag == .windows) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/12602 |
| 52 | 51 | |
| 53 | 52 | comptime try testMulAdd80(); |
| ... | ... | @@ -91,7 +90,6 @@ fn vector16() !void { |
| 91 | 90 | } |
| 92 | 91 | |
| 93 | 92 | test "vector f16" { |
| 94 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 95 | 93 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO |
| 96 | 94 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
| 97 | 95 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| ... | ... | @@ -115,7 +113,6 @@ fn vector32() !void { |
| 115 | 113 | } |
| 116 | 114 | |
| 117 | 115 | test "vector f32" { |
| 118 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 119 | 116 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO |
| 120 | 117 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
| 121 | 118 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| ... | ... | @@ -139,7 +136,6 @@ fn vector64() !void { |
| 139 | 136 | } |
| 140 | 137 | |
| 141 | 138 | test "vector f64" { |
| 142 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 143 | 139 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO |
| 144 | 140 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
| 145 | 141 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| ... | ... | @@ -162,7 +158,6 @@ fn vector80() !void { |
| 162 | 158 | } |
| 163 | 159 | |
| 164 | 160 | test "vector f80" { |
| 165 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 166 | 161 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO |
| 167 | 162 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
| 168 | 163 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| ... | ... | @@ -187,7 +182,6 @@ fn vector128() !void { |
| 187 | 182 | } |
| 188 | 183 | |
| 189 | 184 | test "vector f128" { |
| 190 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 191 | 185 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO |
| 192 | 186 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
| 193 | 187 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
test/behavior/optional.zig-5| ... | ... | @@ -377,8 +377,6 @@ const NoReturn = struct { |
| 377 | 377 | }; |
| 378 | 378 | |
| 379 | 379 | test "optional of noreturn used with if" { |
| 380 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 381 | ||
| 382 | 380 | NoReturn.a = 64; |
| 383 | 381 | if (NoReturn.loop()) |_| { |
| 384 | 382 | @compileError("bad"); |
| ... | ... | @@ -388,8 +386,6 @@ test "optional of noreturn used with if" { |
| 388 | 386 | } |
| 389 | 387 | |
| 390 | 388 | test "optional of noreturn used with orelse" { |
| 391 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 392 | ||
| 393 | 389 | NoReturn.a = 64; |
| 394 | 390 | const val = NoReturn.testOrelse(); |
| 395 | 391 | try expect(val == 123); |
| ... | ... | @@ -419,7 +415,6 @@ test "alignment of wrapping an optional payload" { |
| 419 | 415 | } |
| 420 | 416 | |
| 421 | 417 | test "Optional slice size is optimized" { |
| 422 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 423 | 418 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 424 | 419 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| 425 | 420 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; |
test/behavior/packed-struct.zig-38| ... | ... | @@ -5,38 +5,7 @@ const expect = std.testing.expect; |
| 5 | 5 | const expectEqual = std.testing.expectEqual; |
| 6 | 6 | const native_endian = builtin.cpu.arch.endian(); |
| 7 | 7 | |
| 8 | test "correct size of packed structs" { | |
| 9 | // Stage2 has different packed struct semantics. | |
| 10 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; | |
| 11 | const T1 = packed struct { one: u8, three: [3]u8 }; | |
| 12 | ||
| 13 | try expectEqual(4, @sizeOf(T1)); | |
| 14 | try expectEqual(4 * 8, @bitSizeOf(T1)); | |
| 15 | ||
| 16 | const T2 = packed struct { three: [3]u8, one: u8 }; | |
| 17 | ||
| 18 | try expectEqual(4, @sizeOf(T2)); | |
| 19 | try expectEqual(4 * 8, @bitSizeOf(T2)); | |
| 20 | ||
| 21 | const T3 = packed struct { _1: u1, x: u7, _: u24 }; | |
| 22 | ||
| 23 | try expectEqual(4, @sizeOf(T3)); | |
| 24 | try expectEqual(4 * 8, @bitSizeOf(T3)); | |
| 25 | ||
| 26 | const T4 = packed struct { _1: u1, x: u7, _2: u8, _3: u16 }; | |
| 27 | ||
| 28 | try expectEqual(4, @sizeOf(T4)); | |
| 29 | try expectEqual(4 * 8, @bitSizeOf(T4)); | |
| 30 | ||
| 31 | const T5 = packed struct { _1: u1, x: u7, _2: u16, _3: u8 }; | |
| 32 | ||
| 33 | try expectEqual(4, @sizeOf(T5)); | |
| 34 | try expectEqual(4 * 8, @bitSizeOf(T5)); | |
| 35 | } | |
| 36 | ||
| 37 | 8 | test "flags in packed structs" { |
| 38 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 39 | ||
| 40 | 9 | const Flags1 = packed struct { |
| 41 | 10 | // first 8 bits |
| 42 | 11 | b0_0: u1, |
| ... | ... | @@ -121,8 +90,6 @@ test "flags in packed structs" { |
| 121 | 90 | } |
| 122 | 91 | |
| 123 | 92 | test "consistent size of packed structs" { |
| 124 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 125 | ||
| 126 | 93 | const TxData1 = packed struct { data: u8, _23: u23, full: bool = false }; |
| 127 | 94 | const TxData2 = packed struct { data: u9, _22: u22, full: bool = false }; |
| 128 | 95 | |
| ... | ... | @@ -149,7 +116,6 @@ test "consistent size of packed structs" { |
| 149 | 116 | } |
| 150 | 117 | |
| 151 | 118 | test "correct sizeOf and offsets in packed structs" { |
| 152 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 153 | 119 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 154 | 120 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 155 | 121 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| ... | ... | @@ -218,7 +184,6 @@ test "correct sizeOf and offsets in packed structs" { |
| 218 | 184 | } |
| 219 | 185 | |
| 220 | 186 | test "nested packed structs" { |
| 221 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 222 | 187 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 223 | 188 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 224 | 189 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| ... | ... | @@ -285,7 +250,6 @@ test "regular in irregular packed struct" { |
| 285 | 250 | } |
| 286 | 251 | |
| 287 | 252 | test "byte-aligned field pointer offsets" { |
| 288 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 289 | 253 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| 290 | 254 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 291 | 255 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| ... | ... | @@ -387,7 +351,6 @@ test "byte-aligned field pointer offsets" { |
| 387 | 351 | } |
| 388 | 352 | |
| 389 | 353 | test "load pointer from packed struct" { |
| 390 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 391 | 354 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| 392 | 355 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 393 | 356 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| ... | ... | @@ -571,7 +534,6 @@ test "runtime init of unnamed packed struct type" { |
| 571 | 534 | } |
| 572 | 535 | |
| 573 | 536 | test "packed struct passed to callconv(.C) function" { |
| 574 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 575 | 537 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 576 | 538 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| 577 | 539 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; |
test/behavior/packed_struct_explicit_backing_int.zig-1| ... | ... | @@ -5,7 +5,6 @@ const expectEqual = std.testing.expectEqual; |
| 5 | 5 | const native_endian = builtin.cpu.arch.endian(); |
| 6 | 6 | |
| 7 | 7 | test "packed struct explicit backing integer" { |
| 8 | assert(builtin.zig_backend != .stage1); | |
| 9 | 8 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
| 10 | 9 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 11 | 10 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
test/behavior/pointers.zig-3| ... | ... | @@ -135,9 +135,6 @@ test "peer type resolution with C pointers" { |
| 135 | 135 | } |
| 136 | 136 | |
| 137 | 137 | test "peer type resolution with C pointer and const pointer" { |
| 138 | // stage1 incorrectly resolves to [*]u8 | |
| 139 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 140 | ||
| 141 | 138 | var ptr_c: [*c]u8 = undefined; |
| 142 | 139 | const ptr_const: u8 = undefined; |
| 143 | 140 | try expect(@TypeOf(ptr_c, &ptr_const) == [*c]const u8); |
test/behavior/popcount.zig-1| ... | ... | @@ -65,7 +65,6 @@ fn testPopCountIntegers() !void { |
| 65 | 65 | } |
| 66 | 66 | |
| 67 | 67 | test "@popCount vectors" { |
| 68 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 69 | 68 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO |
| 70 | 69 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
| 71 | 70 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
test/behavior/ptrcast.zig-7| ... | ... | @@ -20,7 +20,6 @@ fn testReinterpretBytesAsInteger() !void { |
| 20 | 20 | } |
| 21 | 21 | |
| 22 | 22 | test "reinterpret an array over multiple elements, with no well-defined layout" { |
| 23 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 24 | 23 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 25 | 24 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 26 | 25 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| ... | ... | @@ -77,8 +76,6 @@ fn testReinterpretBytesAsExternStruct() !void { |
| 77 | 76 | } |
| 78 | 77 | |
| 79 | 78 | test "reinterpret bytes of an extern struct (with under-aligned fields) into another" { |
| 80 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 81 | ||
| 82 | 79 | try testReinterpretExternStructAsExternStruct(); |
| 83 | 80 | comptime try testReinterpretExternStructAsExternStruct(); |
| 84 | 81 | } |
| ... | ... | @@ -101,8 +98,6 @@ fn testReinterpretExternStructAsExternStruct() !void { |
| 101 | 98 | } |
| 102 | 99 | |
| 103 | 100 | test "reinterpret bytes of an extern struct into another" { |
| 104 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 105 | ||
| 106 | 101 | try testReinterpretOverAlignedExternStructAsExternStruct(); |
| 107 | 102 | comptime try testReinterpretOverAlignedExternStructAsExternStruct(); |
| 108 | 103 | } |
| ... | ... | @@ -127,7 +122,6 @@ fn testReinterpretOverAlignedExternStructAsExternStruct() !void { |
| 127 | 122 | } |
| 128 | 123 | |
| 129 | 124 | test "lower reinterpreted comptime field ptr (with under-aligned fields)" { |
| 130 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 131 | 125 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 132 | 126 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 133 | 127 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| ... | ... | @@ -151,7 +145,6 @@ test "lower reinterpreted comptime field ptr (with under-aligned fields)" { |
| 151 | 145 | } |
| 152 | 146 | |
| 153 | 147 | test "lower reinterpreted comptime field ptr" { |
| 154 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 155 | 148 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 156 | 149 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 157 | 150 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
test/behavior/saturating_arithmetic.zig-4| ... | ... | @@ -149,10 +149,6 @@ test "saturating multiplication" { |
| 149 | 149 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 150 | 150 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 151 | 151 | |
| 152 | if (builtin.zig_backend == .stage1 and builtin.cpu.arch == .wasm32) { | |
| 153 | // https://github.com/ziglang/zig/issues/9660 | |
| 154 | return error.SkipZigTest; | |
| 155 | } | |
| 156 | 152 | if (builtin.zig_backend == .stage2_llvm and builtin.cpu.arch == .wasm32) { |
| 157 | 153 | // https://github.com/ziglang/zig/issues/9660 |
| 158 | 154 | return error.SkipZigTest; |
test/behavior/select.zig-1| ... | ... | @@ -32,7 +32,6 @@ fn selectVectors() !void { |
| 32 | 32 | } |
| 33 | 33 | |
| 34 | 34 | test "@select arrays" { |
| 35 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; // TODO | |
| 36 | 35 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO |
| 37 | 36 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
| 38 | 37 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
test/behavior/shuffle.zig+1-1| ... | ... | @@ -71,7 +71,7 @@ test "@shuffle bool 2" { |
| 71 | 71 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 72 | 72 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO |
| 73 | 73 | |
| 74 | if (builtin.zig_backend == .stage1 or builtin.zig_backend == .stage2_llvm) { | |
| 74 | if (builtin.zig_backend == .stage2_llvm) { | |
| 75 | 75 | // https://github.com/ziglang/zig/issues/3246 |
| 76 | 76 | return error.SkipZigTest; |
| 77 | 77 | } |
test/behavior/sizeof_and_typeof.zig-53| ... | ... | @@ -101,52 +101,6 @@ test "@offsetOf" { |
| 101 | 101 | try expect(@ptrToInt(&a.i) - @ptrToInt(&a) == @offsetOf(A, "i")); |
| 102 | 102 | } |
| 103 | 103 | |
| 104 | test "@offsetOf packed struct, array length not power of 2 or multiple of native pointer width in bytes" { | |
| 105 | // Stage2 has different packed struct semantics. | |
| 106 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; | |
| 107 | const p3a_len = 3; | |
| 108 | const P3 = packed struct { | |
| 109 | a: [p3a_len]u8, | |
| 110 | b: usize, | |
| 111 | }; | |
| 112 | try std.testing.expect(0 == @offsetOf(P3, "a")); | |
| 113 | try std.testing.expect(p3a_len == @offsetOf(P3, "b")); | |
| 114 | ||
| 115 | const p5a_len = 5; | |
| 116 | const P5 = packed struct { | |
| 117 | a: [p5a_len]u8, | |
| 118 | b: usize, | |
| 119 | }; | |
| 120 | try std.testing.expect(0 == @offsetOf(P5, "a")); | |
| 121 | try std.testing.expect(p5a_len == @offsetOf(P5, "b")); | |
| 122 | ||
| 123 | const p6a_len = 6; | |
| 124 | const P6 = packed struct { | |
| 125 | a: [p6a_len]u8, | |
| 126 | b: usize, | |
| 127 | }; | |
| 128 | try std.testing.expect(0 == @offsetOf(P6, "a")); | |
| 129 | try std.testing.expect(p6a_len == @offsetOf(P6, "b")); | |
| 130 | ||
| 131 | const p7a_len = 7; | |
| 132 | const P7 = packed struct { | |
| 133 | a: [p7a_len]u8, | |
| 134 | b: usize, | |
| 135 | }; | |
| 136 | try std.testing.expect(0 == @offsetOf(P7, "a")); | |
| 137 | try std.testing.expect(p7a_len == @offsetOf(P7, "b")); | |
| 138 | ||
| 139 | const p9a_len = 9; | |
| 140 | const P9 = packed struct { | |
| 141 | a: [p9a_len]u8, | |
| 142 | b: usize, | |
| 143 | }; | |
| 144 | try std.testing.expect(0 == @offsetOf(P9, "a")); | |
| 145 | try std.testing.expect(p9a_len == @offsetOf(P9, "b")); | |
| 146 | ||
| 147 | // 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 25 etc. are further cases | |
| 148 | } | |
| 149 | ||
| 150 | 104 | test "@bitOffsetOf" { |
| 151 | 105 | // Packed structs have fixed memory layout |
| 152 | 106 | try expect(@bitOffsetOf(P, "a") == 0); |
| ... | ... | @@ -211,8 +165,6 @@ test "branching logic inside @TypeOf" { |
| 211 | 165 | } |
| 212 | 166 | |
| 213 | 167 | test "@bitSizeOf" { |
| 214 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 215 | ||
| 216 | 168 | try expect(@bitSizeOf(u2) == 2); |
| 217 | 169 | try expect(@bitSizeOf(u8) == @sizeOf(u8) * 8); |
| 218 | 170 | try expect(@bitSizeOf(struct { |
| ... | ... | @@ -224,11 +176,6 @@ test "@bitSizeOf" { |
| 224 | 176 | } |
| 225 | 177 | |
| 226 | 178 | test "@sizeOf comparison against zero" { |
| 227 | if (builtin.zig_backend == .stage1) { | |
| 228 | // stage1 gets the wrong answer for size of pointers to zero bit types | |
| 229 | return error.SkipZigTest; | |
| 230 | } | |
| 231 | ||
| 232 | 179 | const S0 = struct { |
| 233 | 180 | f: *@This(), |
| 234 | 181 | }; |
test/behavior/slice.zig+4-28| ... | ... | @@ -182,7 +182,6 @@ test "slicing zero length array" { |
| 182 | 182 | const x = @intToPtr([*]i32, 0x1000)[0..0x500]; |
| 183 | 183 | const y = x[0x100..]; |
| 184 | 184 | test "compile time slice of pointer to hard coded address" { |
| 185 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 186 | 185 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| 187 | 186 | |
| 188 | 187 | try expect(@ptrToInt(x) == 0x1000); |
| ... | ... | @@ -444,10 +443,7 @@ test "slice syntax resulting in pointer-to-array" { |
| 444 | 443 | var array: [2]u8 = [2]u8{ 1, 2 }; |
| 445 | 444 | var slice: ?[]u8 = &array; |
| 446 | 445 | comptime try expect(@TypeOf(&array, slice) == ?[]u8); |
| 447 | if (builtin.zig_backend != .stage1) { | |
| 448 | // stage1 is not passing this case | |
| 449 | comptime try expect(@TypeOf(slice, &array) == ?[]u8); | |
| 450 | } | |
| 446 | comptime try expect(@TypeOf(slice, &array) == ?[]u8); | |
| 451 | 447 | comptime try expect(@TypeOf(slice.?[0..2]) == *[2]u8); |
| 452 | 448 | } |
| 453 | 449 | |
| ... | ... | @@ -479,13 +475,7 @@ test "slice pointer-to-array null terminated" { |
| 479 | 475 | var slice: [:0]u8 = &array; |
| 480 | 476 | try expect(@TypeOf(slice[1..3]) == *[2]u8); |
| 481 | 477 | try expect(@TypeOf(slice[1..3 :4]) == *[2:4]u8); |
| 482 | ||
| 483 | if (builtin.zig_backend == .stage1) { | |
| 484 | try expect(@TypeOf(slice[1..]) == [:0]u8); | |
| 485 | } else { | |
| 486 | // stage2 gives a more accurate, correct answer | |
| 487 | try expect(@TypeOf(slice[1..]) == *[4:0]u8); | |
| 488 | } | |
| 478 | try expect(@TypeOf(slice[1..]) == *[4:0]u8); | |
| 489 | 479 | } |
| 490 | 480 | |
| 491 | 481 | var array = [5:0]u8{ 1, 2, 3, 4, 5 }; |
| ... | ... | @@ -509,12 +499,7 @@ test "slice pointer-to-array zero length" { |
| 509 | 499 | var array = [0:0]u8{}; |
| 510 | 500 | var src_slice: [:0]u8 = &array; |
| 511 | 501 | var slice = src_slice[0..0]; |
| 512 | if (builtin.zig_backend == .stage1) { | |
| 513 | try expect(@TypeOf(slice) == *[0]u8); | |
| 514 | } else { | |
| 515 | // stage2 gives a more accurate, correct answer | |
| 516 | try expect(@TypeOf(slice) == *[0:0]u8); | |
| 517 | } | |
| 502 | try expect(@TypeOf(slice) == *[0:0]u8); | |
| 518 | 503 | } |
| 519 | 504 | } |
| 520 | 505 | |
| ... | ... | @@ -573,16 +558,11 @@ test "array concat of slices gives ptr to array" { |
| 573 | 558 | var b: []const u8 = "asdf"; |
| 574 | 559 | const c = a ++ b; |
| 575 | 560 | try expect(std.mem.eql(u8, c, "aoeuasdf")); |
| 576 | if (builtin.zig_backend != .stage1) { | |
| 577 | // spec change: array concat now returns pointer-to-array for slices | |
| 578 | try expect(@TypeOf(c) == *const [8]u8); | |
| 579 | } | |
| 561 | try expect(@TypeOf(c) == *const [8]u8); | |
| 580 | 562 | } |
| 581 | 563 | } |
| 582 | 564 | |
| 583 | 565 | test "array mult of slice gives ptr to array" { |
| 584 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; // Stage 1 does not support multiplying slices | |
| 585 | ||
| 586 | 566 | comptime { |
| 587 | 567 | var a: []const u8 = "aoeu"; |
| 588 | 568 | const c = a ** 2; |
| ... | ... | @@ -626,8 +606,6 @@ test "slice sentinel access at comptime" { |
| 626 | 606 | } |
| 627 | 607 | |
| 628 | 608 | test "slicing array with sentinel as end index" { |
| 629 | // Doesn't work in stage1 | |
| 630 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 631 | 609 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 632 | 610 | |
| 633 | 611 | const S = struct { |
| ... | ... | @@ -645,8 +623,6 @@ test "slicing array with sentinel as end index" { |
| 645 | 623 | } |
| 646 | 624 | |
| 647 | 625 | test "slicing slice with sentinel as end index" { |
| 648 | // Doesn't work in stage1 | |
| 649 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 650 | 626 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 651 | 627 | |
| 652 | 628 | const S = struct { |
test/behavior/struct.zig+2-40| ... | ... | @@ -419,11 +419,8 @@ test "packed struct 24bits" { |
| 419 | 419 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 420 | 420 | |
| 421 | 421 | comptime { |
| 422 | // stage1 gets the wrong answer for sizeof | |
| 423 | if (builtin.zig_backend != .stage1) { | |
| 424 | std.debug.assert(@sizeOf(Foo24Bits) == @sizeOf(u24)); | |
| 425 | std.debug.assert(@sizeOf(Foo96Bits) == @sizeOf(u96)); | |
| 426 | } | |
| 422 | std.debug.assert(@sizeOf(Foo24Bits) == @sizeOf(u24)); | |
| 423 | std.debug.assert(@sizeOf(Foo96Bits) == @sizeOf(u96)); | |
| 427 | 424 | } |
| 428 | 425 | |
| 429 | 426 | var value = Foo96Bits{ |
| ... | ... | @@ -497,10 +494,6 @@ const Bitfields = packed struct { |
| 497 | 494 | }; |
| 498 | 495 | |
| 499 | 496 | test "packed struct fields are ordered from LSB to MSB" { |
| 500 | if (builtin.zig_backend == .stage1) { | |
| 501 | // stage1 gets the wrong answer for a lot of targets | |
| 502 | return error.SkipZigTest; | |
| 503 | } | |
| 504 | 497 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 505 | 498 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 506 | 499 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| ... | ... | @@ -640,7 +633,6 @@ test "default struct initialization fields" { |
| 640 | 633 | } |
| 641 | 634 | |
| 642 | 635 | test "packed array 24bits" { |
| 643 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 644 | 636 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| 645 | 637 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| 646 | 638 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| ... | ... | @@ -698,25 +690,6 @@ const FooArray24Bits = packed struct { |
| 698 | 690 | c: u16, |
| 699 | 691 | }; |
| 700 | 692 | |
| 701 | test "aligned array of packed struct" { | |
| 702 | // Stage2 has different packed struct semantics. | |
| 703 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; | |
| 704 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | |
| 705 | ||
| 706 | comptime { | |
| 707 | try expect(@sizeOf(FooStructAligned) == 2); | |
| 708 | try expect(@sizeOf(FooArrayOfAligned) == 2 * 2); | |
| 709 | } | |
| 710 | ||
| 711 | var bytes = [_]u8{0xbb} ** @sizeOf(FooArrayOfAligned); | |
| 712 | const ptr = &std.mem.bytesAsSlice(FooArrayOfAligned, bytes[0..])[0]; | |
| 713 | ||
| 714 | try expect(ptr.a[0].a == 0xbb); | |
| 715 | try expect(ptr.a[0].b == 0xbb); | |
| 716 | try expect(ptr.a[1].a == 0xbb); | |
| 717 | try expect(ptr.a[1].b == 0xbb); | |
| 718 | } | |
| 719 | ||
| 720 | 693 | const FooStructAligned = packed struct { |
| 721 | 694 | a: u8, |
| 722 | 695 | b: u8, |
| ... | ... | @@ -1150,7 +1123,6 @@ test "for loop over pointers to struct, getting field from struct pointer" { |
| 1150 | 1123 | } |
| 1151 | 1124 | |
| 1152 | 1125 | test "anon init through error unions and optionals" { |
| 1153 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 1154 | 1126 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 1155 | 1127 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 1156 | 1128 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| ... | ... | @@ -1178,7 +1150,6 @@ test "anon init through error unions and optionals" { |
| 1178 | 1150 | } |
| 1179 | 1151 | |
| 1180 | 1152 | test "anon init through optional" { |
| 1181 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 1182 | 1153 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 1183 | 1154 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 1184 | 1155 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| ... | ... | @@ -1199,7 +1170,6 @@ test "anon init through optional" { |
| 1199 | 1170 | } |
| 1200 | 1171 | |
| 1201 | 1172 | test "anon init through error union" { |
| 1202 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 1203 | 1173 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 1204 | 1174 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 1205 | 1175 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| ... | ... | @@ -1220,7 +1190,6 @@ test "anon init through error union" { |
| 1220 | 1190 | } |
| 1221 | 1191 | |
| 1222 | 1192 | test "typed init through error unions and optionals" { |
| 1223 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 1224 | 1193 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 1225 | 1194 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 1226 | 1195 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| ... | ... | @@ -1283,10 +1252,6 @@ test "loading a struct pointer perfoms a copy" { |
| 1283 | 1252 | } |
| 1284 | 1253 | |
| 1285 | 1254 | test "packed struct aggregate init" { |
| 1286 | if (builtin.zig_backend == .stage1) { | |
| 1287 | // stage1 fails this test on mips | |
| 1288 | return error.SkipZigTest; | |
| 1289 | } | |
| 1290 | 1255 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 1291 | 1256 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 1292 | 1257 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| ... | ... | @@ -1328,8 +1293,6 @@ test "packed struct field access via pointer" { |
| 1328 | 1293 | } |
| 1329 | 1294 | |
| 1330 | 1295 | test "store to comptime field" { |
| 1331 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 1332 | ||
| 1333 | 1296 | { |
| 1334 | 1297 | const S = struct { |
| 1335 | 1298 | comptime a: [2]u32 = [2]u32{ 1, 2 }, |
| ... | ... | @@ -1364,7 +1327,6 @@ test "struct field init value is size of the struct" { |
| 1364 | 1327 | } |
| 1365 | 1328 | |
| 1366 | 1329 | test "under-aligned struct field" { |
| 1367 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 1368 | 1330 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO |
| 1369 | 1331 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 1370 | 1332 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
test/behavior/truncate.zig-5| ... | ... | @@ -60,11 +60,6 @@ test "truncate on comptime integer" { |
| 60 | 60 | } |
| 61 | 61 | |
| 62 | 62 | test "truncate on vectors" { |
| 63 | if (builtin.zig_backend == .stage1) { | |
| 64 | // stage1 fails the comptime test | |
| 65 | return error.SkipZigTest; | |
| 66 | } | |
| 67 | ||
| 68 | 63 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; |
| 69 | 64 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; |
| 70 | 65 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; |
test/behavior/type.zig+2-11| ... | ... | @@ -229,7 +229,7 @@ test "Type.Vector" { |
| 229 | 229 | } |
| 230 | 230 | |
| 231 | 231 | test "Type.AnyFrame" { |
| 232 | if (builtin.zig_backend != .stage1) { | |
| 232 | if (true) { | |
| 233 | 233 | // https://github.com/ziglang/zig/issues/6025 |
| 234 | 234 | return error.SkipZigTest; |
| 235 | 235 | } |
| ... | ... | @@ -246,8 +246,6 @@ fn add(a: i32, b: i32) i32 { |
| 246 | 246 | } |
| 247 | 247 | |
| 248 | 248 | test "Type.ErrorSet" { |
| 249 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 250 | ||
| 251 | 249 | try testing.expect(@Type(.{ .ErrorSet = null }) == anyerror); |
| 252 | 250 | |
| 253 | 251 | // error sets don't compare equal so just check if they compile |
| ... | ... | @@ -369,12 +367,7 @@ test "Type.Enum" { |
| 369 | 367 | try testing.expectEqual(@as(u8, 5), @enumToInt(Foo.b)); |
| 370 | 368 | const Bar = @Type(.{ |
| 371 | 369 | .Enum = .{ |
| 372 | // stage2 only has auto layouts | |
| 373 | .layout = if (builtin.zig_backend == .stage1) | |
| 374 | .Extern | |
| 375 | else | |
| 376 | .Auto, | |
| 377 | ||
| 370 | .layout = .Auto, | |
| 378 | 371 | .tag_type = u32, |
| 379 | 372 | .fields = &.{ |
| 380 | 373 | .{ .name = "a", .value = 1 }, |
| ... | ... | @@ -501,8 +494,6 @@ test "Type.Union from regular enum" { |
| 501 | 494 | } |
| 502 | 495 | |
| 503 | 496 | test "Type.Fn" { |
| 504 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 505 | ||
| 506 | 497 | if (true) { |
| 507 | 498 | // https://github.com/ziglang/zig/issues/12360 |
| 508 | 499 | return error.SkipZigTest; |
test/behavior/type_info.zig+17-26| ... | ... | @@ -201,9 +201,6 @@ test "type info: error set single value" { |
| 201 | 201 | } |
| 202 | 202 | |
| 203 | 203 | test "type info: error set merged" { |
| 204 | // #11022 forces ordering of error sets in stage2 | |
| 205 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 206 | ||
| 207 | 204 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 208 | 205 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 209 | 206 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| ... | ... | @@ -305,8 +302,6 @@ const TestStruct = struct { |
| 305 | 302 | }; |
| 306 | 303 | |
| 307 | 304 | test "type info: packed struct info" { |
| 308 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 309 | ||
| 310 | 305 | try testPackedStruct(); |
| 311 | 306 | comptime try testPackedStruct(); |
| 312 | 307 | } |
| ... | ... | @@ -376,25 +371,21 @@ extern fn typeInfoFoo(a: usize, b: bool, ...) callconv(.C) usize; |
| 376 | 371 | extern fn typeInfoFooAligned(a: usize, b: bool, ...) align(4) callconv(.C) usize; |
| 377 | 372 | |
| 378 | 373 | test "type info: generic function types" { |
| 379 | if (builtin.zig_backend != .stage1) { | |
| 380 | // stage1 marks all args/return types as null if the function | |
| 381 | // is generic at all. stage2 is more specific. | |
| 382 | const G1 = @typeInfo(@TypeOf(generic1)); | |
| 383 | try expect(G1.Fn.args.len == 1); | |
| 384 | try expect(G1.Fn.args[0].is_generic == true); | |
| 385 | try expect(G1.Fn.args[0].arg_type == null); | |
| 386 | try expect(G1.Fn.return_type == void); | |
| 387 | ||
| 388 | const G2 = @typeInfo(@TypeOf(generic2)); | |
| 389 | try expect(G2.Fn.args.len == 3); | |
| 390 | try expect(G2.Fn.args[0].is_generic == false); | |
| 391 | try expect(G2.Fn.args[0].arg_type == type); | |
| 392 | try expect(G2.Fn.args[1].is_generic == true); | |
| 393 | try expect(G2.Fn.args[1].arg_type == null); | |
| 394 | try expect(G2.Fn.args[2].is_generic == false); | |
| 395 | try expect(G2.Fn.args[2].arg_type == u8); | |
| 396 | try expect(G2.Fn.return_type == void); | |
| 397 | } | |
| 374 | const G1 = @typeInfo(@TypeOf(generic1)); | |
| 375 | try expect(G1.Fn.args.len == 1); | |
| 376 | try expect(G1.Fn.args[0].is_generic == true); | |
| 377 | try expect(G1.Fn.args[0].arg_type == null); | |
| 378 | try expect(G1.Fn.return_type == void); | |
| 379 | ||
| 380 | const G2 = @typeInfo(@TypeOf(generic2)); | |
| 381 | try expect(G2.Fn.args.len == 3); | |
| 382 | try expect(G2.Fn.args[0].is_generic == false); | |
| 383 | try expect(G2.Fn.args[0].arg_type == type); | |
| 384 | try expect(G2.Fn.args[1].is_generic == true); | |
| 385 | try expect(G2.Fn.args[1].arg_type == null); | |
| 386 | try expect(G2.Fn.args[2].is_generic == false); | |
| 387 | try expect(G2.Fn.args[2].arg_type == u8); | |
| 388 | try expect(G2.Fn.return_type == void); | |
| 398 | 389 | |
| 399 | 390 | const G3 = @typeInfo(@TypeOf(generic3)); |
| 400 | 391 | try expect(G3.Fn.args.len == 1); |
| ... | ... | @@ -442,7 +433,7 @@ fn testVector() !void { |
| 442 | 433 | } |
| 443 | 434 | |
| 444 | 435 | test "type info: anyframe and anyframe->T" { |
| 445 | if (builtin.zig_backend != .stage1) { | |
| 436 | if (true) { | |
| 446 | 437 | // https://github.com/ziglang/zig/issues/6025 |
| 447 | 438 | return error.SkipZigTest; |
| 448 | 439 | } |
| ... | ... | @@ -501,7 +492,7 @@ fn add(a: i32, b: i32) i32 { |
| 501 | 492 | } |
| 502 | 493 | |
| 503 | 494 | test "type info for async frames" { |
| 504 | if (builtin.zig_backend != .stage1) { | |
| 495 | if (true) { | |
| 505 | 496 | // https://github.com/ziglang/zig/issues/6025 |
| 506 | 497 | return error.SkipZigTest; |
| 507 | 498 | } |
test/behavior/typename.zig-29| ... | ... | @@ -12,12 +12,6 @@ const expectStringStartsWith = std.testing.expectStringStartsWith; |
| 12 | 12 | // failures. |
| 13 | 13 | |
| 14 | 14 | test "anon fn param" { |
| 15 | if (builtin.zig_backend == .stage1) { | |
| 16 | // stage1 uses line/column for the names but we're moving away from that for | |
| 17 | // incremental compilation purposes. | |
| 18 | return error.SkipZigTest; | |
| 19 | } | |
| 20 | ||
| 21 | 15 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 22 | 16 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 23 | 17 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| ... | ... | @@ -43,12 +37,6 @@ test "anon fn param" { |
| 43 | 37 | } |
| 44 | 38 | |
| 45 | 39 | test "anon field init" { |
| 46 | if (builtin.zig_backend == .stage1) { | |
| 47 | // stage1 uses line/column for the names but we're moving away from that for | |
| 48 | // incremental compilation purposes. | |
| 49 | return error.SkipZigTest; | |
| 50 | } | |
| 51 | ||
| 52 | 40 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 53 | 41 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 54 | 42 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| ... | ... | @@ -84,11 +72,6 @@ test "basic" { |
| 84 | 72 | } |
| 85 | 73 | |
| 86 | 74 | test "top level decl" { |
| 87 | if (builtin.zig_backend == .stage1) { | |
| 88 | // stage1 fails to return fully qualified namespaces. | |
| 89 | return error.SkipZigTest; | |
| 90 | } | |
| 91 | ||
| 92 | 75 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 93 | 76 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 94 | 77 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| ... | ... | @@ -208,11 +191,6 @@ pub fn expectEqualStringsIgnoreDigits(expected: []const u8, actual: []const u8) |
| 208 | 191 | } |
| 209 | 192 | |
| 210 | 193 | test "local variable" { |
| 211 | if (builtin.zig_backend == .stage1) { | |
| 212 | // stage1 fails to return fully qualified namespaces. | |
| 213 | return error.SkipZigTest; | |
| 214 | } | |
| 215 | ||
| 216 | 194 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 217 | 195 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 218 | 196 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| ... | ... | @@ -231,7 +209,6 @@ test "local variable" { |
| 231 | 209 | } |
| 232 | 210 | |
| 233 | 211 | test "comptime parameters not converted to anytype in function type" { |
| 234 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 235 | 212 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 236 | 213 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 237 | 214 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| ... | ... | @@ -241,12 +218,6 @@ test "comptime parameters not converted to anytype in function type" { |
| 241 | 218 | } |
| 242 | 219 | |
| 243 | 220 | test "anon name strategy used in sub expression" { |
| 244 | if (builtin.zig_backend == .stage1) { | |
| 245 | // stage1 uses line/column for the names but we're moving away from that for | |
| 246 | // incremental compilation purposes. | |
| 247 | return error.SkipZigTest; | |
| 248 | } | |
| 249 | ||
| 250 | 221 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 251 | 222 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 252 | 223 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
test/behavior/undefined.zig-4| ... | ... | @@ -76,10 +76,6 @@ test "assign undefined to struct with method" { |
| 76 | 76 | } |
| 77 | 77 | |
| 78 | 78 | test "type name of undefined" { |
| 79 | if (builtin.zig_backend == .stage1) { | |
| 80 | // stage1 gets the type name wrong | |
| 81 | return error.SkipZigTest; | |
| 82 | } | |
| 83 | 79 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 84 | 80 | |
| 85 | 81 | const x = undefined; |
test/behavior/union.zig-5| ... | ... | @@ -221,7 +221,6 @@ test "packed union generates correctly aligned type" { |
| 221 | 221 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| 222 | 222 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| 223 | 223 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 224 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 225 | 224 | |
| 226 | 225 | const U = packed union { |
| 227 | 226 | f1: *const fn () error{TestUnexpectedResult}!void, |
| ... | ... | @@ -1002,7 +1001,6 @@ test "cast from pointer to anonymous struct to pointer to union" { |
| 1002 | 1001 | } |
| 1003 | 1002 | |
| 1004 | 1003 | test "switching on non exhaustive union" { |
| 1005 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 1006 | 1004 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 1007 | 1005 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 1008 | 1006 | |
| ... | ... | @@ -1197,7 +1195,6 @@ test "union tag is set when initiated as a temporary value at runtime" { |
| 1197 | 1195 | } |
| 1198 | 1196 | |
| 1199 | 1197 | test "extern union most-aligned field is smaller" { |
| 1200 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 1201 | 1198 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 1202 | 1199 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 1203 | 1200 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| ... | ... | @@ -1246,7 +1243,6 @@ test "return an extern union from C calling convention" { |
| 1246 | 1243 | } |
| 1247 | 1244 | |
| 1248 | 1245 | test "noreturn field in union" { |
| 1249 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 1250 | 1246 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 1251 | 1247 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 1252 | 1248 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| ... | ... | @@ -1298,7 +1294,6 @@ test "noreturn field in union" { |
| 1298 | 1294 | } |
| 1299 | 1295 | |
| 1300 | 1296 | test "union and enum field order doesn't match" { |
| 1301 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 1302 | 1297 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 1303 | 1298 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 1304 | 1299 |
test/behavior/vector.zig+2-39| ... | ... | @@ -6,12 +6,6 @@ const expect = std.testing.expect; |
| 6 | 6 | const expectEqual = std.testing.expectEqual; |
| 7 | 7 | |
| 8 | 8 | test "implicit cast vector to array - bool" { |
| 9 | if (builtin.zig_backend == .stage1) { | |
| 10 | // Regressed in LLVM 14: | |
| 11 | // https://github.com/llvm/llvm-project/issues/55522 | |
| 12 | return error.SkipZigTest; | |
| 13 | } | |
| 14 | ||
| 15 | 9 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
| 16 | 10 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 17 | 11 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| ... | ... | @@ -180,9 +174,7 @@ test "tuple to vector" { |
| 180 | 174 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 181 | 175 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO |
| 182 | 176 | |
| 183 | if ((builtin.zig_backend == .stage1 or builtin.zig_backend == .stage2_llvm) and | |
| 184 | builtin.cpu.arch == .aarch64) | |
| 185 | { | |
| 177 | if (builtin.zig_backend == .stage2_llvm and builtin.cpu.arch == .aarch64) { | |
| 186 | 178 | // Regressed with LLVM 14: |
| 187 | 179 | // https://github.com/ziglang/zig/issues/12012 |
| 188 | 180 | return error.SkipZigTest; |
| ... | ... | @@ -197,9 +189,7 @@ test "tuple to vector" { |
| 197 | 189 | } |
| 198 | 190 | |
| 199 | 191 | try std.testing.expectEqual(v, Vec3{ 1, 1, 1 }); |
| 200 | if (builtin.zig_backend != .stage1) { | |
| 201 | try std.testing.expectEqual(v, .{ 1, 1, 1 }); | |
| 202 | } | |
| 192 | try std.testing.expectEqual(v, .{ 1, 1, 1 }); | |
| 203 | 193 | } |
| 204 | 194 | }; |
| 205 | 195 | try S.doTheTest(); |
| ... | ... | @@ -406,12 +396,6 @@ test "initialize vector which is a struct field" { |
| 406 | 396 | } |
| 407 | 397 | |
| 408 | 398 | test "vector comparison operators" { |
| 409 | if (builtin.zig_backend == .stage1) { | |
| 410 | // Regressed in LLVM 14: | |
| 411 | // https://github.com/llvm/llvm-project/issues/55522 | |
| 412 | return error.SkipZigTest; | |
| 413 | } | |
| 414 | ||
| 415 | 399 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
| 416 | 400 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO |
| 417 | 401 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| ... | ... | @@ -801,7 +785,6 @@ test "vector reduce operation" { |
| 801 | 785 | } |
| 802 | 786 | |
| 803 | 787 | test "vector @reduce comptime" { |
| 804 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 805 | 788 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
| 806 | 789 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 807 | 790 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| ... | ... | @@ -937,10 +920,6 @@ test "saturating shift-left" { |
| 937 | 920 | } |
| 938 | 921 | |
| 939 | 922 | test "multiplication-assignment operator with an array operand" { |
| 940 | if (builtin.zig_backend == .stage1) { | |
| 941 | // stage1 emits a compile error | |
| 942 | return error.SkipZigTest; | |
| 943 | } | |
| 944 | 923 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
| 945 | 924 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 946 | 925 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| ... | ... | @@ -961,10 +940,6 @@ test "multiplication-assignment operator with an array operand" { |
| 961 | 940 | } |
| 962 | 941 | |
| 963 | 942 | test "@addWithOverflow" { |
| 964 | if (builtin.zig_backend == .stage1) { | |
| 965 | // stage1 doesn't support vector args | |
| 966 | return error.SkipZigTest; | |
| 967 | } | |
| 968 | 943 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
| 969 | 944 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 970 | 945 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| ... | ... | @@ -1011,10 +986,6 @@ test "@addWithOverflow" { |
| 1011 | 986 | } |
| 1012 | 987 | |
| 1013 | 988 | test "@subWithOverflow" { |
| 1014 | if (builtin.zig_backend == .stage1) { | |
| 1015 | // stage1 doesn't support vector args | |
| 1016 | return error.SkipZigTest; | |
| 1017 | } | |
| 1018 | 989 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
| 1019 | 990 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 1020 | 991 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| ... | ... | @@ -1045,10 +1016,6 @@ test "@subWithOverflow" { |
| 1045 | 1016 | } |
| 1046 | 1017 | |
| 1047 | 1018 | test "@mulWithOverflow" { |
| 1048 | if (builtin.zig_backend == .stage1) { | |
| 1049 | // stage1 doesn't support vector args | |
| 1050 | return error.SkipZigTest; | |
| 1051 | } | |
| 1052 | 1019 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
| 1053 | 1020 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 1054 | 1021 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| ... | ... | @@ -1069,10 +1036,6 @@ test "@mulWithOverflow" { |
| 1069 | 1036 | } |
| 1070 | 1037 | |
| 1071 | 1038 | test "@shlWithOverflow" { |
| 1072 | if (builtin.zig_backend == .stage1) { | |
| 1073 | // stage1 doesn't support vector args | |
| 1074 | return error.SkipZigTest; | |
| 1075 | } | |
| 1076 | 1039 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO |
| 1077 | 1040 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
| 1078 | 1041 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |