| ... | ... | @@ -72,6 +72,11 @@ fn testMemsetSlice() !void { |
| 72 | 72 | } |
| 73 | 73 | |
| 74 | 74 | test "memset with bool element" { |
| 75 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 76 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| 77 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; |
| 78 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; |
| 79 | |
| 75 | 80 | var buf: [5]bool = undefined; |
| 76 | 81 | @memset(&buf, true); |
| 77 | 82 | try expect(buf[2]); |
| ... | ... | @@ -79,6 +84,11 @@ test "memset with bool element" { |
| 79 | 84 | } |
| 80 | 85 | |
| 81 | 86 | test "memset with 1-byte struct element" { |
| 87 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 88 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| 89 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; |
| 90 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; |
| 91 | |
| 82 | 92 | const S = struct { x: bool }; |
| 83 | 93 | var buf: [5]S = undefined; |
| 84 | 94 | @memset(&buf, .{ .x = true }); |
| ... | ... | @@ -87,6 +97,11 @@ test "memset with 1-byte struct element" { |
| 87 | 97 | } |
| 88 | 98 | |
| 89 | 99 | test "memset with 1-byte array element" { |
| 100 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 101 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| 102 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; |
| 103 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; |
| 104 | |
| 90 | 105 | const A = [1]bool; |
| 91 | 106 | var buf: [5]A = undefined; |
| 92 | 107 | @memset(&buf, .{true}); |
| ... | ... | @@ -95,6 +110,11 @@ test "memset with 1-byte array element" { |
| 95 | 110 | } |
| 96 | 111 | |
| 97 | 112 | test "memset with large array element, runtime known" { |
| 113 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 114 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| 115 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; |
| 116 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; |
| 117 | |
| 98 | 118 | const A = [128]u64; |
| 99 | 119 | var buf: [5]A = undefined; |
| 100 | 120 | var runtime_known_element = [_]u64{0} ** 128; |
| ... | ... | @@ -107,6 +127,11 @@ test "memset with large array element, runtime known" { |
| 107 | 127 | } |
| 108 | 128 | |
| 109 | 129 | test "memset with large array element, comptime known" { |
| 130 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 131 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| 132 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; |
| 133 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; |
| 134 | |
| 110 | 135 | const A = [128]u64; |
| 111 | 136 | var buf: [5]A = undefined; |
| 112 | 137 | const comptime_known_element = [_]u64{0} ** 128; |