| ... | @@ -272,7 +272,6 @@ test "comparison between union and enum literal" { | ... | @@ -272,7 +272,6 @@ test "comparison between union and enum literal" { |
| 272 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | 272 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| 273 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 273 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 274 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 274 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 275 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | | |
| 276 | | 275 | |
| 277 | try testComparison(); | 276 | try testComparison(); |
| 278 | comptime try testComparison(); | 277 | comptime try testComparison(); |
| ... | @@ -288,7 +287,6 @@ test "cast union to tag type of union" { | ... | @@ -288,7 +287,6 @@ test "cast union to tag type of union" { |
| 288 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | 287 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| 289 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 288 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 290 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 289 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 291 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | | |
| 292 | | 290 | |
| 293 | try testCastUnionToTag(); | 291 | try testCastUnionToTag(); |
| 294 | comptime try testCastUnionToTag(); | 292 | comptime try testCastUnionToTag(); |
| ... | @@ -309,7 +307,6 @@ test "cast tag type of union to union" { | ... | @@ -309,7 +307,6 @@ test "cast tag type of union to union" { |
| 309 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | 307 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| 310 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 308 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 311 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 309 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 312 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | | |
| 313 | | 310 | |
| 314 | var x: Value2 = Letter2.B; | 311 | var x: Value2 = Letter2.B; |
| 315 | try expect(@as(Letter2, x) == Letter2.B); | 312 | try expect(@as(Letter2, x) == Letter2.B); |
| ... | @@ -325,7 +322,6 @@ test "implicit cast union to its tag type" { | ... | @@ -325,7 +322,6 @@ test "implicit cast union to its tag type" { |
| 325 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | 322 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| 326 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 323 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 327 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 324 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 328 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | | |
| 329 | | 325 | |
| 330 | var x: Value2 = Letter2.B; | 326 | var x: Value2 = Letter2.B; |
| 331 | try expect(x == Letter2.B); | 327 | try expect(x == Letter2.B); |
| ... | @@ -422,7 +418,6 @@ test "tagged union with no payloads" { | ... | @@ -422,7 +418,6 @@ test "tagged union with no payloads" { |
| 422 | | 418 | |
| 423 | test "union with only 1 field casted to its enum type" { | 419 | test "union with only 1 field casted to its enum type" { |
| 424 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 420 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 425 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | | |
| 426 | | 421 | |
| 427 | const Literal = union(enum) { | 422 | const Literal = union(enum) { |
| 428 | Number: f64, | 423 | Number: f64, |
| ... | @@ -736,7 +731,6 @@ test "@enumToInt works on unions" { | ... | @@ -736,7 +731,6 @@ test "@enumToInt works on unions" { |
| 736 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 731 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 737 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 732 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 738 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 733 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 739 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | | |
| 740 | | 734 | |
| 741 | const Bar = union(enum) { | 735 | const Bar = union(enum) { |
| 742 | A: bool, | 736 | A: bool, |
| ... | @@ -959,7 +953,6 @@ test "function call result coerces from tagged union to the tag" { | ... | @@ -959,7 +953,6 @@ test "function call result coerces from tagged union to the tag" { |
| 959 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 953 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 960 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 954 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 961 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 955 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 962 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | | |
| 963 | | 956 | |
| 964 | const S = struct { | 957 | const S = struct { |
| 965 | const Arch = union(enum) { | 958 | const Arch = union(enum) { |
| ... | @@ -1467,8 +1460,6 @@ test "packed union in packed struct" { | ... | @@ -1467,8 +1460,6 @@ test "packed union in packed struct" { |
| 1467 | } | 1460 | } |
| 1468 | | 1461 | |
| 1469 | test "Namespace-like union" { | 1462 | test "Namespace-like union" { |
| 1470 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | | |
| 1471 | | | |
| 1472 | const DepType = enum { | 1463 | const DepType = enum { |
| 1473 | git, | 1464 | git, |
| 1474 | http, | 1465 | http, |