| author | |
| committer | |
| log | d339e86fb1308f8df37fc351ee01007492e72f25 |
| tree | 304a296032e8f91da1194272ca5eff4d473a707d |
| parent | fd6200eda6d4fe19c34a59430a88a9ce38d6d7a4 |
10 files changed, 31 insertions(+), 1 deletions(-)
test/behavior/array.zig+4| ... | ... | @@ -47,6 +47,7 @@ fn getArrayLen(a: []const u32) usize { |
| 47 | 47 | |
| 48 | 48 | test "array concat with undefined" { |
| 49 | 49 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 50 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | |
| 50 | 51 | |
| 51 | 52 | const S = struct { |
| 52 | 53 | fn doTheTest() !void { |
| ... | ... | @@ -70,6 +71,7 @@ test "array concat with undefined" { |
| 70 | 71 | test "array concat with tuple" { |
| 71 | 72 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 72 | 73 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 74 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | |
| 73 | 75 | |
| 74 | 76 | const array: [2]u8 = .{ 1, 2 }; |
| 75 | 77 | { |
| ... | ... | @@ -103,6 +105,7 @@ test "array init with mult" { |
| 103 | 105 | |
| 104 | 106 | test "array literal with explicit type" { |
| 105 | 107 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 108 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | |
| 106 | 109 | |
| 107 | 110 | const hex_mult: [4]u16 = .{ 4096, 256, 16, 1 }; |
| 108 | 111 | |
| ... | ... | @@ -203,6 +206,7 @@ test "nested arrays of strings" { |
| 203 | 206 | |
| 204 | 207 | test "nested arrays of integers" { |
| 205 | 208 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 209 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | |
| 206 | 210 | |
| 207 | 211 | const array_of_numbers = [_][2]u8{ |
| 208 | 212 | [2]u8{ 1, 2 }, |
test/behavior/bugs/12051.zig+1| ... | ... | @@ -6,6 +6,7 @@ test { |
| 6 | 6 | if (builtin.zig_backend == .stage2_x86) return error.SkipZigTest; // TODO |
| 7 | 7 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 8 | 8 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 9 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | |
| 9 | 10 | const x = X{}; |
| 10 | 11 | try std.testing.expectEqual(@as(u16, 0), x.y.a); |
| 11 | 12 | try std.testing.expectEqual(false, x.y.b); |
test/behavior/bugs/12450.zig+1| ... | ... | @@ -13,6 +13,7 @@ test { |
| 13 | 13 | if (builtin.zig_backend == .stage2_x86) return error.SkipZigTest; // TODO |
| 14 | 14 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 15 | 15 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 16 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | |
| 16 | 17 | var f1: *align(16) Foo = @alignCast(16, @ptrCast(*align(1) Foo, &buffer[0])); |
| 17 | 18 | try expect(@typeInfo(@TypeOf(f1)).Pointer.alignment == 16); |
| 18 | 19 | try expect(@ptrToInt(f1) == @ptrToInt(&f1.a)); |
test/behavior/comptime_memory.zig+3| ... | ... | @@ -76,6 +76,7 @@ fn bigToNativeEndian(comptime T: type, v: T) T { |
| 76 | 76 | } |
| 77 | 77 | test "type pun endianness" { |
| 78 | 78 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 79 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | |
| 79 | 80 | |
| 80 | 81 | comptime { |
| 81 | 82 | const StructOfBytes = extern struct { x: [4]u8 }; |
| ... | ... | @@ -376,6 +377,8 @@ test "offset field ptr by enclosing array element size" { |
| 376 | 377 | |
| 377 | 378 | test "accessing reinterpreted memory of parent object" { |
| 378 | 379 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 380 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | |
| 381 | ||
| 379 | 382 | const S = extern struct { |
| 380 | 383 | a: f32, |
| 381 | 384 | b: [4]u8, |
test/behavior/packed-struct.zig+3-1| ... | ... | @@ -563,7 +563,7 @@ test "packed struct passed to callconv(.C) function" { |
| 563 | 563 | test "overaligned pointer to packed struct" { |
| 564 | 564 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 565 | 565 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| 566 | ||
| 566 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | |
| 567 | 567 | const S = packed struct { a: u32, b: u32 }; |
| 568 | 568 | var foo: S align(4) = .{ .a = 123, .b = 456 }; |
| 569 | 569 | const ptr: *align(4) S = &foo; |
| ... | ... | @@ -583,6 +583,7 @@ test "overaligned pointer to packed struct" { |
| 583 | 583 | test "packed struct initialized in bitcast" { |
| 584 | 584 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 585 | 585 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 586 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | |
| 586 | 587 | |
| 587 | 588 | const T = packed struct { val: u8 }; |
| 588 | 589 | var val: u8 = 123; |
| ... | ... | @@ -595,6 +596,7 @@ test "pointer to container level packed struct field" { |
| 595 | 596 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| 596 | 597 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; |
| 597 | 598 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| 599 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | |
| 598 | 600 | |
| 599 | 601 | const S = packed struct(u32) { |
| 600 | 602 | test_bit: bool, |
test/behavior/ptrcast.zig+10| ... | ... | @@ -4,6 +4,8 @@ const expect = std.testing.expect; |
| 4 | 4 | const native_endian = builtin.target.cpu.arch.endian(); |
| 5 | 5 | |
| 6 | 6 | test "reinterpret bytes as integer with nonzero offset" { |
| 7 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | |
| 8 | ||
| 7 | 9 | try testReinterpretBytesAsInteger(); |
| 8 | 10 | comptime try testReinterpretBytesAsInteger(); |
| 9 | 11 | } |
| ... | ... | @@ -74,6 +76,8 @@ fn testReinterpretBytesAsExternStruct() !void { |
| 74 | 76 | } |
| 75 | 77 | |
| 76 | 78 | test "reinterpret bytes of an extern struct (with under-aligned fields) into another" { |
| 79 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | |
| 80 | ||
| 77 | 81 | try testReinterpretExternStructAsExternStruct(); |
| 78 | 82 | comptime try testReinterpretExternStructAsExternStruct(); |
| 79 | 83 | } |
| ... | ... | @@ -96,6 +100,8 @@ fn testReinterpretExternStructAsExternStruct() !void { |
| 96 | 100 | } |
| 97 | 101 | |
| 98 | 102 | test "reinterpret bytes of an extern struct into another" { |
| 103 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | |
| 104 | ||
| 99 | 105 | try testReinterpretOverAlignedExternStructAsExternStruct(); |
| 100 | 106 | comptime try testReinterpretOverAlignedExternStructAsExternStruct(); |
| 101 | 107 | } |
| ... | ... | @@ -191,6 +197,8 @@ const Bytes = struct { |
| 191 | 197 | }; |
| 192 | 198 | |
| 193 | 199 | test "comptime ptrcast keeps larger alignment" { |
| 200 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | |
| 201 | ||
| 194 | 202 | comptime { |
| 195 | 203 | const a: u32 = 1234; |
| 196 | 204 | const p = @ptrCast([*]const u8, &a); |
| ... | ... | @@ -199,6 +207,8 @@ test "comptime ptrcast keeps larger alignment" { |
| 199 | 207 | } |
| 200 | 208 | |
| 201 | 209 | test "ptrcast of const integer has the correct object size" { |
| 210 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | |
| 211 | ||
| 202 | 212 | const is_value = ~@intCast(isize, std.math.minInt(isize)); |
| 203 | 213 | const is_bytes = @ptrCast([*]const u8, &is_value)[0..@sizeOf(isize)]; |
| 204 | 214 | if (@sizeOf(isize) == 8) { |
test/behavior/tuple.zig+5| ... | ... | @@ -296,6 +296,7 @@ test "coerce tuple to tuple" { |
| 296 | 296 | test "tuple type with void field" { |
| 297 | 297 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 298 | 298 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 299 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | |
| 299 | 300 | |
| 300 | 301 | const T = std.meta.Tuple(&[_]type{void}); |
| 301 | 302 | const x = T{{}}; |
| ... | ... | @@ -341,6 +342,7 @@ test "tuple type with void field and a runtime field" { |
| 341 | 342 | test "branching inside tuple literal" { |
| 342 | 343 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 343 | 344 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 345 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | |
| 344 | 346 | |
| 345 | 347 | const S = struct { |
| 346 | 348 | fn foo(a: anytype) !void { |
| ... | ... | @@ -355,6 +357,7 @@ test "tuple initialized with a runtime known value" { |
| 355 | 357 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 356 | 358 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| 357 | 359 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| 360 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | |
| 358 | 361 | |
| 359 | 362 | const E = union(enum) { e: []const u8 }; |
| 360 | 363 | const W = union(enum) { w: E }; |
| ... | ... | @@ -368,6 +371,7 @@ test "tuple of struct concatenation and coercion to array" { |
| 368 | 371 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| 369 | 372 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| 370 | 373 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; |
| 374 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | |
| 371 | 375 | |
| 372 | 376 | const StructWithDefault = struct { value: f32 = 42 }; |
| 373 | 377 | const SomeStruct = struct { array: [4]StructWithDefault }; |
| ... | ... | @@ -381,6 +385,7 @@ test "tuple of struct concatenation and coercion to array" { |
| 381 | 385 | test "nested runtime conditionals in tuple initializer" { |
| 382 | 386 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 383 | 387 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 388 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | |
| 384 | 389 | |
| 385 | 390 | var data: u8 = 0; |
| 386 | 391 | const x = .{ |
test/behavior/union.zig+1| ... | ... | @@ -1495,6 +1495,7 @@ test "packed union with zero-bit field" { |
| 1495 | 1495 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 1496 | 1496 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 1497 | 1497 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
| 1498 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | |
| 1498 | 1499 | |
| 1499 | 1500 | const S = packed struct { |
| 1500 | 1501 | nested: packed union { |
test/behavior/var_args.zig+2| ... | ... | @@ -95,6 +95,7 @@ fn doNothingWithFirstArg(args: anytype) void { |
| 95 | 95 | |
| 96 | 96 | test "simple variadic function" { |
| 97 | 97 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 98 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | |
| 98 | 99 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 99 | 100 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
| 100 | 101 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| ... | ... | @@ -143,6 +144,7 @@ test "simple variadic function" { |
| 143 | 144 | |
| 144 | 145 | test "variadic functions" { |
| 145 | 146 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 147 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | |
| 146 | 148 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 147 | 149 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
| 148 | 150 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
test/behavior/vector.zig+1| ... | ... | @@ -1282,6 +1282,7 @@ test "store to vector in slice" { |
| 1282 | 1282 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 1283 | 1283 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
| 1284 | 1284 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 1285 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | |
| 1285 | 1286 | |
| 1286 | 1287 | var v = [_]@Vector(3, f32){ |
| 1287 | 1288 | .{ 1, 1, 1 }, |