| author | |
| committer | |
| log | 4751356d7f1da157665d37e29216628e61ddf079 |
| tree | 4d703caff2eec93161d5f37737b24fa87073053b |
| parent | f2e8c79763723e394f57af84af977d91652568b5 |
* improve names
* properly categorize a couple of bug cases
* mark one as already passing8 files changed, 39 insertions(+), 40 deletions(-)
test/behavior.zig-2| ... | ... | @@ -67,7 +67,6 @@ test { |
| 67 | 67 | _ = @import("behavior/bugs/6781.zig"); |
| 68 | 68 | _ = @import("behavior/bugs/6850.zig"); |
| 69 | 69 | _ = @import("behavior/bugs/7003.zig"); |
| 70 | _ = @import("behavior/bugs/7027.zig"); | |
| 71 | 70 | _ = @import("behavior/bugs/7047.zig"); |
| 72 | 71 | _ = @import("behavior/bugs/7187.zig"); |
| 73 | 72 | _ = @import("behavior/bugs/7250.zig"); |
| ... | ... | @@ -82,7 +81,6 @@ test { |
| 82 | 81 | _ = @import("behavior/bugs/11162.zig"); |
| 83 | 82 | _ = @import("behavior/bugs/11165.zig"); |
| 84 | 83 | _ = @import("behavior/bugs/11181.zig"); |
| 85 | _ = @import("behavior/bugs/11182.zig"); | |
| 86 | 84 | _ = @import("behavior/bugs/11213.zig"); |
| 87 | 85 | _ = @import("behavior/byteswap.zig"); |
| 88 | 86 | _ = @import("behavior/byval_arg_var.zig"); |
test/behavior/bugs/10970.zig+2-1| ... | ... | @@ -3,11 +3,12 @@ const builtin = @import("builtin"); |
| 3 | 3 | fn retOpt() ?u32 { |
| 4 | 4 | return null; |
| 5 | 5 | } |
| 6 | test { | |
| 6 | test "breaking from a loop in an if statement" { | |
| 7 | 7 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| 8 | 8 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 9 | 9 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| 10 | 10 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; |
| 11 | ||
| 11 | 12 | var cond = true; |
| 12 | 13 | const opt = while (cond) { |
| 13 | 14 | if (retOpt()) |opt| { |
test/behavior/bugs/11162.zig+1-1| ... | ... | @@ -2,7 +2,7 @@ const std = @import("std"); |
| 2 | 2 | const builtin = @import("builtin"); |
| 3 | 3 | const expect = std.testing.expect; |
| 4 | 4 | |
| 5 | test { | |
| 5 | test "aggregate initializers should allow initializing comptime fields, verifying equality (stage2 only)" { | |
| 6 | 6 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; // TODO |
| 7 | 7 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO |
| 8 | 8 |
test/behavior/bugs/11182.zig deleted-10| ... | ... | @@ -1,10 +0,0 @@ |
| 1 | const std = @import("std"); | |
| 2 | const builtin = @import("builtin"); | |
| 3 | ||
| 4 | test { | |
| 5 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 6 | ||
| 7 | const T = @TypeOf(.{ @as(i32, 0), @as(u32, 0) }); | |
| 8 | var a = T{ 0, 0 }; | |
| 9 | _ = a; | |
| 10 | } |
test/behavior/bugs/7027.zig deleted-21| ... | ... | @@ -1,21 +0,0 @@ |
| 1 | const Foobar = struct { | |
| 2 | myTypes: [128]type, | |
| 3 | str: [1024]u8, | |
| 4 | ||
| 5 | fn foo() @This() { | |
| 6 | comptime var foobar: Foobar = undefined; | |
| 7 | foobar.str = [_]u8{'a'} ** 1024; | |
| 8 | return foobar; | |
| 9 | } | |
| 10 | }; | |
| 11 | ||
| 12 | fn foo(arg: anytype) void { | |
| 13 | _ = arg; | |
| 14 | } | |
| 15 | ||
| 16 | test { | |
| 17 | if (@import("builtin").zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 18 | ||
| 19 | comptime var foobar = Foobar.foo(); | |
| 20 | foo(foobar.str[0..10]); | |
| 21 | } |
test/behavior/eval.zig+27| ... | ... | @@ -1203,3 +1203,30 @@ test "equality of pointers to comptime const" { |
| 1203 | 1203 | const a: i32 = undefined; |
| 1204 | 1204 | comptime assert(&a == &a); |
| 1205 | 1205 | } |
| 1206 | ||
| 1207 | test "storing an array of type in a field" { | |
| 1208 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 1209 | ||
| 1210 | const S = struct { | |
| 1211 | fn doTheTest() void { | |
| 1212 | comptime var foobar = Foobar.foo(); | |
| 1213 | foo(foobar.str[0..10]); | |
| 1214 | } | |
| 1215 | const Foobar = struct { | |
| 1216 | myTypes: [128]type, | |
| 1217 | str: [1024]u8, | |
| 1218 | ||
| 1219 | fn foo() @This() { | |
| 1220 | comptime var foobar: Foobar = undefined; | |
| 1221 | foobar.str = [_]u8{'a'} ** 1024; | |
| 1222 | return foobar; | |
| 1223 | } | |
| 1224 | }; | |
| 1225 | ||
| 1226 | fn foo(arg: anytype) void { | |
| 1227 | _ = arg; | |
| 1228 | } | |
| 1229 | }; | |
| 1230 | ||
| 1231 | S.doTheTest(); | |
| 1232 | } |
test/behavior/floatop.zig+1-5| ... | ... | @@ -651,11 +651,7 @@ test "negation f128" { |
| 651 | 651 | } |
| 652 | 652 | |
| 653 | 653 | test "eval @setFloatMode at compile-time" { |
| 654 | if (builtin.zig_backend != .stage1) { | |
| 655 | // let's delay solving this one; I want to re-evaluate this language feature, and | |
| 656 | // we don't rely on it for self-hosted. | |
| 657 | return error.SkipZigTest; // TODO | |
| 658 | } | |
| 654 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | |
| 659 | 655 | |
| 660 | 656 | const result = comptime fnWithFloatMode(); |
| 661 | 657 | try expect(result == 1234.0); |
test/behavior/tuple.zig+8| ... | ... | @@ -192,3 +192,11 @@ test "tuple as the result from a labeled block" { |
| 192 | 192 | try S.doTheTest(); |
| 193 | 193 | comptime try S.doTheTest(); |
| 194 | 194 | } |
| 195 | ||
| 196 | test "initializing tuple with explicit type" { | |
| 197 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 198 | ||
| 199 | const T = @TypeOf(.{ @as(i32, 0), @as(u32, 0) }); | |
| 200 | var a = T{ 0, 0 }; | |
| 201 | _ = a; | |
| 202 | } |