| author | |
| committer | |
| log | 32e85d44eb72122d174de02d4020f149026dd787 |
| tree | c1cdf78a31337b74fce4a70d99d9eb1384651937 |
| parent | 2e6e39a7004dae626ad3088cbf1e652f157e6db8 |
56 files changed, 447 insertions(+), 17 deletions(-)
lib/std/Thread/Condition.zig+6| ... | @@ -369,6 +369,8 @@ test "Condition - signal" { | ... | @@ -369,6 +369,8 @@ test "Condition - signal" { |
| 369 | return error.SkipZigTest; | 369 | return error.SkipZigTest; |
| 370 | } | 370 | } |
| 371 | 371 | ||
| 372 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 373 | |||
| 372 | const num_threads = 4; | 374 | const num_threads = 4; |
| 373 | 375 | ||
| 374 | const SignalTest = struct { | 376 | const SignalTest = struct { |
| ... | @@ -498,6 +500,8 @@ test "Condition - broadcasting" { | ... | @@ -498,6 +500,8 @@ test "Condition - broadcasting" { |
| 498 | return error.SkipZigTest; | 500 | return error.SkipZigTest; |
| 499 | } | 501 | } |
| 500 | 502 | ||
| 503 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 504 | |||
| 501 | const num_threads = 10; | 505 | const num_threads = 10; |
| 502 | 506 | ||
| 503 | const BroadcastTest = struct { | 507 | const BroadcastTest = struct { |
| ... | @@ -565,6 +569,8 @@ test "Condition - broadcasting - wake all threads" { | ... | @@ -565,6 +569,8 @@ test "Condition - broadcasting - wake all threads" { |
| 565 | return error.SkipZigTest; | 569 | return error.SkipZigTest; |
| 566 | } | 570 | } |
| 567 | 571 | ||
| 572 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 573 | |||
| 568 | var num_runs: usize = 1; | 574 | var num_runs: usize = 1; |
| 569 | const num_threads = 10; | 575 | const num_threads = 10; |
| 570 | 576 |
lib/std/Thread/Mutex.zig+2| ... | @@ -289,6 +289,8 @@ test "Mutex - many contended" { | ... | @@ -289,6 +289,8 @@ test "Mutex - many contended" { |
| 289 | return error.SkipZigTest; | 289 | return error.SkipZigTest; |
| 290 | } | 290 | } |
| 291 | 291 | ||
| 292 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 293 | |||
| 292 | const num_threads = 4; | 294 | const num_threads = 4; |
| 293 | const num_increments = 1000; | 295 | const num_increments = 1000; |
| 294 | 296 |
lib/std/Thread/RwLock.zig+2| ... | @@ -297,6 +297,8 @@ test "RwLock - concurrent access" { | ... | @@ -297,6 +297,8 @@ test "RwLock - concurrent access" { |
| 297 | if (builtin.single_threaded) | 297 | if (builtin.single_threaded) |
| 298 | return; | 298 | return; |
| 299 | 299 | ||
| 300 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 301 | |||
| 300 | const num_writers: usize = 2; | 302 | const num_writers: usize = 2; |
| 301 | const num_readers: usize = 4; | 303 | const num_readers: usize = 4; |
| 302 | const num_writes: usize = 10000; | 304 | const num_writes: usize = 10000; |
lib/std/Uri.zig+2| ... | @@ -685,6 +685,8 @@ test "Special test" { | ... | @@ -685,6 +685,8 @@ test "Special test" { |
| 685 | } | 685 | } |
| 686 | 686 | ||
| 687 | test "URI escaping" { | 687 | test "URI escaping" { |
| 688 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 689 | |||
| 688 | const input = "\\ö/ äöß ~~.adas-https://canvas:123/#ads&&sad"; | 690 | const input = "\\ö/ äöß ~~.adas-https://canvas:123/#ads&&sad"; |
| 689 | const expected = "%5C%C3%B6%2F%20%C3%A4%C3%B6%C3%9F%20~~.adas-https%3A%2F%2Fcanvas%3A123%2F%23ads%26%26sad"; | 691 | const expected = "%5C%C3%B6%2F%20%C3%A4%C3%B6%C3%9F%20~~.adas-https%3A%2F%2Fcanvas%3A123%2F%23ads%26%26sad"; |
| 690 | 692 |
lib/std/array_hash_map.zig+15| ... | @@ -1,4 +1,5 @@ | ... | @@ -1,4 +1,5 @@ |
| 1 | const std = @import("std.zig"); | 1 | const std = @import("std.zig"); |
| 2 | const builtin = @import("builtin"); | ||
| 2 | const debug = std.debug; | 3 | const debug = std.debug; |
| 3 | const assert = debug.assert; | 4 | const assert = debug.assert; |
| 4 | const testing = std.testing; | 5 | const testing = std.testing; |
| ... | @@ -2137,6 +2138,8 @@ test "ensure capacity leak" { | ... | @@ -2137,6 +2138,8 @@ test "ensure capacity leak" { |
| 2137 | } | 2138 | } |
| 2138 | 2139 | ||
| 2139 | test "big map" { | 2140 | test "big map" { |
| 2141 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 2142 | |||
| 2140 | var map = AutoArrayHashMap(i32, i32).init(std.testing.allocator); | 2143 | var map = AutoArrayHashMap(i32, i32).init(std.testing.allocator); |
| 2141 | defer map.deinit(); | 2144 | defer map.deinit(); |
| 2142 | 2145 | ||
| ... | @@ -2190,6 +2193,8 @@ test "big map" { | ... | @@ -2190,6 +2193,8 @@ test "big map" { |
| 2190 | } | 2193 | } |
| 2191 | 2194 | ||
| 2192 | test "clone" { | 2195 | test "clone" { |
| 2196 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 2197 | |||
| 2193 | var original = AutoArrayHashMap(i32, i32).init(std.testing.allocator); | 2198 | var original = AutoArrayHashMap(i32, i32).init(std.testing.allocator); |
| 2194 | defer original.deinit(); | 2199 | defer original.deinit(); |
| 2195 | 2200 | ||
| ... | @@ -2216,6 +2221,8 @@ test "clone" { | ... | @@ -2216,6 +2221,8 @@ test "clone" { |
| 2216 | } | 2221 | } |
| 2217 | 2222 | ||
| 2218 | test "shrink" { | 2223 | test "shrink" { |
| 2224 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 2225 | |||
| 2219 | var map = AutoArrayHashMap(i32, i32).init(std.testing.allocator); | 2226 | var map = AutoArrayHashMap(i32, i32).init(std.testing.allocator); |
| 2220 | defer map.deinit(); | 2227 | defer map.deinit(); |
| 2221 | 2228 | ||
| ... | @@ -2256,6 +2263,8 @@ test "shrink" { | ... | @@ -2256,6 +2263,8 @@ test "shrink" { |
| 2256 | } | 2263 | } |
| 2257 | 2264 | ||
| 2258 | test "pop" { | 2265 | test "pop" { |
| 2266 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 2267 | |||
| 2259 | var map = AutoArrayHashMap(i32, i32).init(std.testing.allocator); | 2268 | var map = AutoArrayHashMap(i32, i32).init(std.testing.allocator); |
| 2260 | defer map.deinit(); | 2269 | defer map.deinit(); |
| 2261 | 2270 | ||
| ... | @@ -2274,6 +2283,8 @@ test "pop" { | ... | @@ -2274,6 +2283,8 @@ test "pop" { |
| 2274 | } | 2283 | } |
| 2275 | 2284 | ||
| 2276 | test "popOrNull" { | 2285 | test "popOrNull" { |
| 2286 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 2287 | |||
| 2277 | var map = AutoArrayHashMap(i32, i32).init(std.testing.allocator); | 2288 | var map = AutoArrayHashMap(i32, i32).init(std.testing.allocator); |
| 2278 | defer map.deinit(); | 2289 | defer map.deinit(); |
| 2279 | 2290 | ||
| ... | @@ -2294,6 +2305,8 @@ test "popOrNull" { | ... | @@ -2294,6 +2305,8 @@ test "popOrNull" { |
| 2294 | } | 2305 | } |
| 2295 | 2306 | ||
| 2296 | test "reIndex" { | 2307 | test "reIndex" { |
| 2308 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 2309 | |||
| 2297 | var map = ArrayHashMap(i32, i32, AutoContext(i32), true).init(std.testing.allocator); | 2310 | var map = ArrayHashMap(i32, i32, AutoContext(i32), true).init(std.testing.allocator); |
| 2298 | defer map.deinit(); | 2311 | defer map.deinit(); |
| 2299 | 2312 | ||
| ... | @@ -2338,6 +2351,8 @@ test "auto store_hash" { | ... | @@ -2338,6 +2351,8 @@ test "auto store_hash" { |
| 2338 | } | 2351 | } |
| 2339 | 2352 | ||
| 2340 | test "sort" { | 2353 | test "sort" { |
| 2354 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 2355 | |||
| 2341 | var map = AutoArrayHashMap(i32, i32).init(std.testing.allocator); | 2356 | var map = AutoArrayHashMap(i32, i32).init(std.testing.allocator); |
| 2342 | defer map.deinit(); | 2357 | defer map.deinit(); |
| 2343 | 2358 |
lib/std/array_list.zig+11| ... | @@ -1,4 +1,5 @@ | ... | @@ -1,4 +1,5 @@ |
| 1 | const std = @import("std.zig"); | 1 | const std = @import("std.zig"); |
| 2 | const builtin = @import("builtin"); | ||
| 2 | const debug = std.debug; | 3 | const debug = std.debug; |
| 3 | const assert = debug.assert; | 4 | const assert = debug.assert; |
| 4 | const testing = std.testing; | 5 | const testing = std.testing; |
| ... | @@ -1183,6 +1184,8 @@ test "std.ArrayList/ArrayListUnmanaged.initCapacity" { | ... | @@ -1183,6 +1184,8 @@ test "std.ArrayList/ArrayListUnmanaged.initCapacity" { |
| 1183 | } | 1184 | } |
| 1184 | 1185 | ||
| 1185 | test "std.ArrayList/ArrayListUnmanaged.clone" { | 1186 | test "std.ArrayList/ArrayListUnmanaged.clone" { |
| 1187 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1188 | |||
| 1186 | const a = testing.allocator; | 1189 | const a = testing.allocator; |
| 1187 | { | 1190 | { |
| 1188 | var array = ArrayList(i32).init(a); | 1191 | var array = ArrayList(i32).init(a); |
| ... | @@ -1224,6 +1227,8 @@ test "std.ArrayList/ArrayListUnmanaged.clone" { | ... | @@ -1224,6 +1227,8 @@ test "std.ArrayList/ArrayListUnmanaged.clone" { |
| 1224 | } | 1227 | } |
| 1225 | 1228 | ||
| 1226 | test "std.ArrayList/ArrayListUnmanaged.basic" { | 1229 | test "std.ArrayList/ArrayListUnmanaged.basic" { |
| 1230 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1231 | |||
| 1227 | const a = testing.allocator; | 1232 | const a = testing.allocator; |
| 1228 | { | 1233 | { |
| 1229 | var list = ArrayList(i32).init(a); | 1234 | var list = ArrayList(i32).init(a); |
| ... | @@ -1508,6 +1513,8 @@ test "std.ArrayList/ArrayListUnmanaged.insert" { | ... | @@ -1508,6 +1513,8 @@ test "std.ArrayList/ArrayListUnmanaged.insert" { |
| 1508 | } | 1513 | } |
| 1509 | 1514 | ||
| 1510 | test "std.ArrayList/ArrayListUnmanaged.insertSlice" { | 1515 | test "std.ArrayList/ArrayListUnmanaged.insertSlice" { |
| 1516 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1517 | |||
| 1511 | const a = testing.allocator; | 1518 | const a = testing.allocator; |
| 1512 | { | 1519 | { |
| 1513 | var list = ArrayList(i32).init(a); | 1520 | var list = ArrayList(i32).init(a); |
| ... | @@ -1554,6 +1561,8 @@ test "std.ArrayList/ArrayListUnmanaged.insertSlice" { | ... | @@ -1554,6 +1561,8 @@ test "std.ArrayList/ArrayListUnmanaged.insertSlice" { |
| 1554 | } | 1561 | } |
| 1555 | 1562 | ||
| 1556 | test "std.ArrayList/ArrayListUnmanaged.replaceRange" { | 1563 | test "std.ArrayList/ArrayListUnmanaged.replaceRange" { |
| 1564 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1565 | |||
| 1557 | var arena = std.heap.ArenaAllocator.init(testing.allocator); | 1566 | var arena = std.heap.ArenaAllocator.init(testing.allocator); |
| 1558 | defer arena.deinit(); | 1567 | defer arena.deinit(); |
| 1559 | const a = arena.allocator(); | 1568 | const a = arena.allocator(); |
| ... | @@ -1725,6 +1734,8 @@ test "shrink still sets length when resizing is disabled" { | ... | @@ -1725,6 +1734,8 @@ test "shrink still sets length when resizing is disabled" { |
| 1725 | } | 1734 | } |
| 1726 | 1735 | ||
| 1727 | test "shrinkAndFree with a copy" { | 1736 | test "shrinkAndFree with a copy" { |
| 1737 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1738 | |||
| 1728 | var failing_allocator = testing.FailingAllocator.init(testing.allocator, .{ .resize_fail_index = 0 }); | 1739 | var failing_allocator = testing.FailingAllocator.init(testing.allocator, .{ .resize_fail_index = 0 }); |
| 1729 | const a = failing_allocator.allocator(); | 1740 | const a = failing_allocator.allocator(); |
| 1730 | 1741 |
lib/std/atomic/Atomic.zig+2| ... | @@ -469,6 +469,8 @@ test "Atomic.fetchSub" { | ... | @@ -469,6 +469,8 @@ test "Atomic.fetchSub" { |
| 469 | } | 469 | } |
| 470 | 470 | ||
| 471 | test "Atomic.fetchMin" { | 471 | test "Atomic.fetchMin" { |
| 472 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 473 | |||
| 472 | inline for (atomicIntTypes()) |Int| { | 474 | inline for (atomicIntTypes()) |Int| { |
| 473 | inline for (atomic_rmw_orderings) |ordering| { | 475 | inline for (atomic_rmw_orderings) |ordering| { |
| 474 | var x = Atomic(Int).init(5); | 476 | var x = Atomic(Int).init(5); |
lib/std/atomic/queue.zig+2| ... | @@ -175,6 +175,8 @@ const puts_per_thread = 500; | ... | @@ -175,6 +175,8 @@ const puts_per_thread = 500; |
| 175 | const put_thread_count = 3; | 175 | const put_thread_count = 3; |
| 176 | 176 | ||
| 177 | test "std.atomic.Queue" { | 177 | test "std.atomic.Queue" { |
| 178 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 179 | |||
| 178 | var plenty_of_memory = try std.heap.page_allocator.alloc(u8, 300 * 1024); | 180 | var plenty_of_memory = try std.heap.page_allocator.alloc(u8, 300 * 1024); |
| 179 | defer std.heap.page_allocator.free(plenty_of_memory); | 181 | defer std.heap.page_allocator.free(plenty_of_memory); |
| 180 | 182 |
lib/std/bit_set.zig+7-2| ... | @@ -33,6 +33,7 @@ | ... | @@ -33,6 +33,7 @@ |
| 33 | const std = @import("std.zig"); | 33 | const std = @import("std.zig"); |
| 34 | const assert = std.debug.assert; | 34 | const assert = std.debug.assert; |
| 35 | const Allocator = std.mem.Allocator; | 35 | const Allocator = std.mem.Allocator; |
| 36 | const builtin = @import("builtin"); | ||
| 36 | 37 | ||
| 37 | /// Returns the optimal static bit set type for the specified number | 38 | /// Returns the optimal static bit set type for the specified number |
| 38 | /// of elements: either `IntegerBitSet` or `ArrayBitSet`, | 39 | /// of elements: either `IntegerBitSet` or `ArrayBitSet`, |
| ... | @@ -1636,7 +1637,7 @@ fn testStaticBitSet(comptime Set: type) !void { | ... | @@ -1636,7 +1637,7 @@ fn testStaticBitSet(comptime Set: type) !void { |
| 1636 | } | 1637 | } |
| 1637 | 1638 | ||
| 1638 | test "IntegerBitSet" { | 1639 | test "IntegerBitSet" { |
| 1639 | switch (@import("builtin").zig_backend) { | 1640 | switch (builtin.zig_backend) { |
| 1640 | .stage2_c, .stage2_x86_64 => return error.SkipZigTest, | 1641 | .stage2_c, .stage2_x86_64 => return error.SkipZigTest, |
| 1641 | else => {}, | 1642 | else => {}, |
| 1642 | } | 1643 | } |
| ... | @@ -1652,7 +1653,7 @@ test "IntegerBitSet" { | ... | @@ -1652,7 +1653,7 @@ test "IntegerBitSet" { |
| 1652 | } | 1653 | } |
| 1653 | 1654 | ||
| 1654 | test "ArrayBitSet" { | 1655 | test "ArrayBitSet" { |
| 1655 | switch (@import("builtin").zig_backend) { | 1656 | switch (builtin.zig_backend) { |
| 1656 | .stage2_x86_64 => return error.SkipZigTest, | 1657 | .stage2_x86_64 => return error.SkipZigTest, |
| 1657 | else => {}, | 1658 | else => {}, |
| 1658 | } | 1659 | } |
| ... | @@ -1667,6 +1668,8 @@ test "ArrayBitSet" { | ... | @@ -1667,6 +1668,8 @@ test "ArrayBitSet" { |
| 1667 | } | 1668 | } |
| 1668 | 1669 | ||
| 1669 | test "DynamicBitSetUnmanaged" { | 1670 | test "DynamicBitSetUnmanaged" { |
| 1671 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1672 | |||
| 1670 | const allocator = std.testing.allocator; | 1673 | const allocator = std.testing.allocator; |
| 1671 | var a = try DynamicBitSetUnmanaged.initEmpty(allocator, 300); | 1674 | var a = try DynamicBitSetUnmanaged.initEmpty(allocator, 300); |
| 1672 | try testing.expectEqual(@as(usize, 0), a.count()); | 1675 | try testing.expectEqual(@as(usize, 0), a.count()); |
| ... | @@ -1720,6 +1723,8 @@ test "DynamicBitSetUnmanaged" { | ... | @@ -1720,6 +1723,8 @@ test "DynamicBitSetUnmanaged" { |
| 1720 | } | 1723 | } |
| 1721 | 1724 | ||
| 1722 | test "DynamicBitSet" { | 1725 | test "DynamicBitSet" { |
| 1726 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1727 | |||
| 1723 | const allocator = std.testing.allocator; | 1728 | const allocator = std.testing.allocator; |
| 1724 | var a = try DynamicBitSet.initEmpty(allocator, 300); | 1729 | var a = try DynamicBitSet.initEmpty(allocator, 300); |
| 1725 | try testing.expectEqual(@as(usize, 0), a.count()); | 1730 | try testing.expectEqual(@as(usize, 0), a.count()); |
lib/std/compress/deflate/compressor.zig+2| ... | @@ -1069,6 +1069,8 @@ var deflate_tests = [_]DeflateTest{ | ... | @@ -1069,6 +1069,8 @@ var deflate_tests = [_]DeflateTest{ |
| 1069 | }; | 1069 | }; |
| 1070 | 1070 | ||
| 1071 | test "deflate" { | 1071 | test "deflate" { |
| 1072 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1073 | |||
| 1072 | for (deflate_tests) |dt| { | 1074 | for (deflate_tests) |dt| { |
| 1073 | var output = ArrayList(u8).init(testing.allocator); | 1075 | var output = ArrayList(u8).init(testing.allocator); |
| 1074 | defer output.deinit(); | 1076 | defer output.deinit(); |
lib/std/compress/deflate/compressor_test.zig+18| ... | @@ -154,6 +154,8 @@ fn testToFromWithLimit(input: []const u8, limit: [11]u32) !void { | ... | @@ -154,6 +154,8 @@ fn testToFromWithLimit(input: []const u8, limit: [11]u32) !void { |
| 154 | } | 154 | } |
| 155 | 155 | ||
| 156 | test "deflate/inflate" { | 156 | test "deflate/inflate" { |
| 157 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 158 | |||
| 157 | var limits = [_]u32{0} ** 11; | 159 | var limits = [_]u32{0} ** 11; |
| 158 | 160 | ||
| 159 | var test0 = [_]u8{}; | 161 | var test0 = [_]u8{}; |
| ... | @@ -178,6 +180,8 @@ test "deflate/inflate" { | ... | @@ -178,6 +180,8 @@ test "deflate/inflate" { |
| 178 | } | 180 | } |
| 179 | 181 | ||
| 180 | test "very long sparse chunk" { | 182 | test "very long sparse chunk" { |
| 183 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 184 | |||
| 181 | // A SparseReader returns a stream consisting of 0s ending with 65,536 (1<<16) 1s. | 185 | // A SparseReader returns a stream consisting of 0s ending with 65,536 (1<<16) 1s. |
| 182 | // This tests missing hash references in a very large input. | 186 | // This tests missing hash references in a very large input. |
| 183 | const SparseReader = struct { | 187 | const SparseReader = struct { |
| ... | @@ -239,6 +243,8 @@ test "very long sparse chunk" { | ... | @@ -239,6 +243,8 @@ test "very long sparse chunk" { |
| 239 | } | 243 | } |
| 240 | 244 | ||
| 241 | test "compressor reset" { | 245 | test "compressor reset" { |
| 246 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 247 | |||
| 242 | for (std.enums.values(deflate.Compression)) |c| { | 248 | for (std.enums.values(deflate.Compression)) |c| { |
| 243 | try testWriterReset(c, null); | 249 | try testWriterReset(c, null); |
| 244 | try testWriterReset(c, "dict"); | 250 | try testWriterReset(c, "dict"); |
| ... | @@ -289,6 +295,8 @@ fn testWriterReset(level: deflate.Compression, dict: ?[]const u8) !void { | ... | @@ -289,6 +295,8 @@ fn testWriterReset(level: deflate.Compression, dict: ?[]const u8) !void { |
| 289 | } | 295 | } |
| 290 | 296 | ||
| 291 | test "decompressor dictionary" { | 297 | test "decompressor dictionary" { |
| 298 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 299 | |||
| 292 | const dict = "hello world"; // dictionary | 300 | const dict = "hello world"; // dictionary |
| 293 | const text = "hello again world"; | 301 | const text = "hello again world"; |
| 294 | 302 | ||
| ... | @@ -329,6 +337,8 @@ test "decompressor dictionary" { | ... | @@ -329,6 +337,8 @@ test "decompressor dictionary" { |
| 329 | } | 337 | } |
| 330 | 338 | ||
| 331 | test "compressor dictionary" { | 339 | test "compressor dictionary" { |
| 340 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 341 | |||
| 332 | const dict = "hello world"; | 342 | const dict = "hello world"; |
| 333 | const text = "hello again world"; | 343 | const text = "hello again world"; |
| 334 | 344 | ||
| ... | @@ -375,6 +385,8 @@ test "compressor dictionary" { | ... | @@ -375,6 +385,8 @@ test "compressor dictionary" { |
| 375 | // Update the hash for best_speed only if d.index < d.maxInsertIndex | 385 | // Update the hash for best_speed only if d.index < d.maxInsertIndex |
| 376 | // See https://golang.org/issue/2508 | 386 | // See https://golang.org/issue/2508 |
| 377 | test "Go non-regression test for 2508" { | 387 | test "Go non-regression test for 2508" { |
| 388 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 389 | |||
| 378 | var comp = try compressor( | 390 | var comp = try compressor( |
| 379 | testing.allocator, | 391 | testing.allocator, |
| 380 | io.null_writer, | 392 | io.null_writer, |
| ... | @@ -392,6 +404,8 @@ test "Go non-regression test for 2508" { | ... | @@ -392,6 +404,8 @@ test "Go non-regression test for 2508" { |
| 392 | } | 404 | } |
| 393 | 405 | ||
| 394 | test "deflate/inflate string" { | 406 | test "deflate/inflate string" { |
| 407 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 408 | |||
| 395 | const StringTest = struct { | 409 | const StringTest = struct { |
| 396 | filename: []const u8, | 410 | filename: []const u8, |
| 397 | limit: [11]u32, | 411 | limit: [11]u32, |
| ... | @@ -439,6 +453,8 @@ test "deflate/inflate string" { | ... | @@ -439,6 +453,8 @@ test "deflate/inflate string" { |
| 439 | } | 453 | } |
| 440 | 454 | ||
| 441 | test "inflate reset" { | 455 | test "inflate reset" { |
| 456 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 457 | |||
| 442 | const strings = [_][]const u8{ | 458 | const strings = [_][]const u8{ |
| 443 | "lorem ipsum izzle fo rizzle", | 459 | "lorem ipsum izzle fo rizzle", |
| 444 | "the quick brown fox jumped over", | 460 | "the quick brown fox jumped over", |
| ... | @@ -485,6 +501,8 @@ test "inflate reset" { | ... | @@ -485,6 +501,8 @@ test "inflate reset" { |
| 485 | } | 501 | } |
| 486 | 502 | ||
| 487 | test "inflate reset dictionary" { | 503 | test "inflate reset dictionary" { |
| 504 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 505 | |||
| 488 | const dict = "the lorem fox"; | 506 | const dict = "the lorem fox"; |
| 489 | const strings = [_][]const u8{ | 507 | const strings = [_][]const u8{ |
| 490 | "lorem ipsum izzle fo rizzle", | 508 | "lorem ipsum izzle fo rizzle", |
lib/std/compress/deflate/deflate_fast.zig+2| ... | @@ -649,6 +649,8 @@ test "best speed shift offsets" { | ... | @@ -649,6 +649,8 @@ test "best speed shift offsets" { |
| 649 | } | 649 | } |
| 650 | 650 | ||
| 651 | test "best speed reset" { | 651 | test "best speed reset" { |
| 652 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 653 | |||
| 652 | // test that encoding is consistent across a warparound of the table offset. | 654 | // test that encoding is consistent across a warparound of the table offset. |
| 653 | // See https://github.com/golang/go/issues/34121 | 655 | // See https://github.com/golang/go/issues/34121 |
| 654 | const fmt = std.fmt; | 656 | const fmt = std.fmt; |
lib/std/compress/deflate/deflate_fast_test.zig+5| ... | @@ -1,4 +1,5 @@ | ... | @@ -1,4 +1,5 @@ |
| 1 | const std = @import("std"); | 1 | const std = @import("std"); |
| 2 | const builtin = @import("builtin"); | ||
| 2 | const expect = std.testing.expect; | 3 | const expect = std.testing.expect; |
| 3 | const io = std.io; | 4 | const io = std.io; |
| 4 | const mem = std.mem; | 5 | const mem = std.mem; |
| ... | @@ -11,6 +12,8 @@ const inflate = @import("decompressor.zig"); | ... | @@ -11,6 +12,8 @@ const inflate = @import("decompressor.zig"); |
| 11 | const deflate_const = @import("deflate_const.zig"); | 12 | const deflate_const = @import("deflate_const.zig"); |
| 12 | 13 | ||
| 13 | test "best speed" { | 14 | test "best speed" { |
| 15 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 16 | |||
| 14 | // Tests that round-tripping through deflate and then inflate recovers the original input. | 17 | // Tests that round-tripping through deflate and then inflate recovers the original input. |
| 15 | // The Write sizes are near the thresholds in the compressor.encSpeed method (0, 16, 128), as well | 18 | // The Write sizes are near the thresholds in the compressor.encSpeed method (0, 16, 128), as well |
| 16 | // as near `deflate_const.max_store_block_size` (65535). | 19 | // as near `deflate_const.max_store_block_size` (65535). |
| ... | @@ -93,6 +96,8 @@ test "best speed" { | ... | @@ -93,6 +96,8 @@ test "best speed" { |
| 93 | } | 96 | } |
| 94 | 97 | ||
| 95 | test "best speed max match offset" { | 98 | test "best speed max match offset" { |
| 99 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 100 | |||
| 96 | const abc = "abcdefgh"; | 101 | const abc = "abcdefgh"; |
| 97 | const xyz = "stuvwxyz"; | 102 | const xyz = "stuvwxyz"; |
| 98 | const input_margin = 16 - 1; | 103 | const input_margin = 16 - 1; |
lib/std/compress/deflate/huffman_bit_writer.zig+6| ... | @@ -845,6 +845,8 @@ const testing = std.testing; | ... | @@ -845,6 +845,8 @@ const testing = std.testing; |
| 845 | const ArrayList = std.ArrayList; | 845 | const ArrayList = std.ArrayList; |
| 846 | 846 | ||
| 847 | test "writeBlockHuff" { | 847 | test "writeBlockHuff" { |
| 848 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 849 | |||
| 848 | // Tests huffman encoding against reference files to detect possible regressions. | 850 | // Tests huffman encoding against reference files to detect possible regressions. |
| 849 | // If encoding/bit allocation changes you can regenerate these files | 851 | // If encoding/bit allocation changes you can regenerate these files |
| 850 | 852 | ||
| ... | @@ -1569,6 +1571,8 @@ const TestType = enum { | ... | @@ -1569,6 +1571,8 @@ const TestType = enum { |
| 1569 | }; | 1571 | }; |
| 1570 | 1572 | ||
| 1571 | test "writeBlock" { | 1573 | test "writeBlock" { |
| 1574 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1575 | |||
| 1572 | // tests if the writeBlock encoding has changed. | 1576 | // tests if the writeBlock encoding has changed. |
| 1573 | 1577 | ||
| 1574 | const ttype: TestType = .write_block; | 1578 | const ttype: TestType = .write_block; |
| ... | @@ -1584,6 +1588,8 @@ test "writeBlock" { | ... | @@ -1584,6 +1588,8 @@ test "writeBlock" { |
| 1584 | } | 1588 | } |
| 1585 | 1589 | ||
| 1586 | test "writeBlockDynamic" { | 1590 | test "writeBlockDynamic" { |
| 1591 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1592 | |||
| 1587 | // tests if the writeBlockDynamic encoding has changed. | 1593 | // tests if the writeBlockDynamic encoding has changed. |
| 1588 | 1594 | ||
| 1589 | const ttype: TestType = .write_dyn_block; | 1595 | const ttype: TestType = .write_dyn_block; |
lib/std/compress/deflate/huffman_code.zig+2| ... | @@ -360,6 +360,8 @@ fn byFreq(context: void, a: LiteralNode, b: LiteralNode) bool { | ... | @@ -360,6 +360,8 @@ fn byFreq(context: void, a: LiteralNode, b: LiteralNode) bool { |
| 360 | } | 360 | } |
| 361 | 361 | ||
| 362 | test "generate a Huffman code from an array of frequencies" { | 362 | test "generate a Huffman code from an array of frequencies" { |
| 363 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 364 | |||
| 363 | var freqs: [19]u16 = [_]u16{ | 365 | var freqs: [19]u16 = [_]u16{ |
| 364 | 8, // 0 | 366 | 8, // 0 |
| 365 | 1, // 1 | 367 | 1, // 1 |
lib/std/compress/gzip.zig+2| ... | @@ -174,6 +174,8 @@ fn testReader(data: []const u8, comptime expected: []const u8) !void { | ... | @@ -174,6 +174,8 @@ fn testReader(data: []const u8, comptime expected: []const u8) !void { |
| 174 | // https://tools.ietf.org/rfc/rfc1952.txt length=25037 bytes | 174 | // https://tools.ietf.org/rfc/rfc1952.txt length=25037 bytes |
| 175 | // SHA256=164ef0897b4cbec63abf1b57f069f3599bd0fb7c72c2a4dee21bd7e03ec9af67 | 175 | // SHA256=164ef0897b4cbec63abf1b57f069f3599bd0fb7c72c2a4dee21bd7e03ec9af67 |
| 176 | test "compressed data" { | 176 | test "compressed data" { |
| 177 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 178 | |||
| 177 | try testReader( | 179 | try testReader( |
| 178 | @embedFile("testdata/rfc1952.txt.gz"), | 180 | @embedFile("testdata/rfc1952.txt.gz"), |
| 179 | @embedFile("testdata/rfc1952.txt"), | 181 | @embedFile("testdata/rfc1952.txt"), |
lib/std/compress/lzma/vec2d.zig+2| ... | @@ -50,6 +50,8 @@ const expectEqualSlices = std.testing.expectEqualSlices; | ... | @@ -50,6 +50,8 @@ const expectEqualSlices = std.testing.expectEqualSlices; |
| 50 | const expectError = std.testing.expectError; | 50 | const expectError = std.testing.expectError; |
| 51 | 51 | ||
| 52 | test "Vec2D.init" { | 52 | test "Vec2D.init" { |
| 53 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 54 | |||
| 53 | const allocator = testing.allocator; | 55 | const allocator = testing.allocator; |
| 54 | var vec2d = try Vec2D(i32).init(allocator, 1, .{ 2, 3 }); | 56 | var vec2d = try Vec2D(i32).init(allocator, 1, .{ 2, 3 }); |
| 55 | defer vec2d.deinit(allocator); | 57 | defer vec2d.deinit(allocator); |
lib/std/compress/xz/test.zig+2| ... | @@ -19,6 +19,8 @@ fn testReader(data: []const u8, comptime expected: []const u8) !void { | ... | @@ -19,6 +19,8 @@ fn testReader(data: []const u8, comptime expected: []const u8) !void { |
| 19 | } | 19 | } |
| 20 | 20 | ||
| 21 | test "compressed data" { | 21 | test "compressed data" { |
| 22 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 23 | |||
| 22 | try testReader(@embedFile("testdata/good-0-empty.xz"), ""); | 24 | try testReader(@embedFile("testdata/good-0-empty.xz"), ""); |
| 23 | 25 | ||
| 24 | inline for ([_][]const u8{ | 26 | inline for ([_][]const u8{ |
lib/std/compress/zlib.zig+4| ... | @@ -199,6 +199,8 @@ fn testDecompress(data: []const u8, expected: []const u8) !void { | ... | @@ -199,6 +199,8 @@ fn testDecompress(data: []const u8, expected: []const u8) !void { |
| 199 | // https://tools.ietf.org/rfc/rfc1951.txt length=36944 bytes | 199 | // https://tools.ietf.org/rfc/rfc1951.txt length=36944 bytes |
| 200 | // SHA256=5ebf4b5b7fe1c3a0c0ab9aa3ac8c0f3853a7dc484905e76e03b0b0f301350009 | 200 | // SHA256=5ebf4b5b7fe1c3a0c0ab9aa3ac8c0f3853a7dc484905e76e03b0b0f301350009 |
| 201 | test "compressed data" { | 201 | test "compressed data" { |
| 202 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 203 | |||
| 202 | const rfc1951_txt = @embedFile("testdata/rfc1951.txt"); | 204 | const rfc1951_txt = @embedFile("testdata/rfc1951.txt"); |
| 203 | 205 | ||
| 204 | // Compressed with compression level = 0 | 206 | // Compressed with compression level = 0 |
| ... | @@ -264,6 +266,8 @@ test "sanity checks" { | ... | @@ -264,6 +266,8 @@ test "sanity checks" { |
| 264 | } | 266 | } |
| 265 | 267 | ||
| 266 | test "compress data" { | 268 | test "compress data" { |
| 269 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 270 | |||
| 267 | const allocator = testing.allocator; | 271 | const allocator = testing.allocator; |
| 268 | const rfc1951_txt = @embedFile("testdata/rfc1951.txt"); | 272 | const rfc1951_txt = @embedFile("testdata/rfc1951.txt"); |
| 269 | 273 |
lib/std/compress/zstandard.zig+2| ... | @@ -266,6 +266,8 @@ fn testReader(data: []const u8, comptime expected: []const u8) !void { | ... | @@ -266,6 +266,8 @@ fn testReader(data: []const u8, comptime expected: []const u8) !void { |
| 266 | } | 266 | } |
| 267 | 267 | ||
| 268 | test "zstandard decompression" { | 268 | test "zstandard decompression" { |
| 269 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 270 | |||
| 269 | const uncompressed = @embedFile("testdata/rfc8478.txt"); | 271 | const uncompressed = @embedFile("testdata/rfc8478.txt"); |
| 270 | const compressed3 = @embedFile("testdata/rfc8478.txt.zst.3"); | 272 | const compressed3 = @embedFile("testdata/rfc8478.txt.zst.3"); |
| 271 | const compressed19 = @embedFile("testdata/rfc8478.txt.zst.19"); | 273 | const compressed19 = @embedFile("testdata/rfc8478.txt.zst.19"); |
lib/std/crypto/poly1305.zig+2| ... | @@ -196,6 +196,8 @@ pub const Poly1305 = struct { | ... | @@ -196,6 +196,8 @@ pub const Poly1305 = struct { |
| 196 | }; | 196 | }; |
| 197 | 197 | ||
| 198 | test "poly1305 rfc7439 vector1" { | 198 | test "poly1305 rfc7439 vector1" { |
| 199 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 200 | |||
| 199 | const expected_mac = "\xa8\x06\x1d\xc1\x30\x51\x36\xc6\xc2\x2b\x8b\xaf\x0c\x01\x27\xa9"; | 201 | const expected_mac = "\xa8\x06\x1d\xc1\x30\x51\x36\xc6\xc2\x2b\x8b\xaf\x0c\x01\x27\xa9"; |
| 200 | 202 | ||
| 201 | const msg = "Cryptographic Forum Research Group"; | 203 | const msg = "Cryptographic Forum Research Group"; |
lib/std/crypto/scrypt.zig+4-1| ... | @@ -3,6 +3,7 @@ | ... | @@ -3,6 +3,7 @@ |
| 3 | // https://github.com/Tarsnap/scrypt | 3 | // https://github.com/Tarsnap/scrypt |
| 4 | 4 | ||
| 5 | const std = @import("std"); | 5 | const std = @import("std"); |
| 6 | const builtin = @import("builtin"); | ||
| 6 | const crypto = std.crypto; | 7 | const crypto = std.crypto; |
| 7 | const fmt = std.fmt; | 8 | const fmt = std.fmt; |
| 8 | const io = std.io; | 9 | const io = std.io; |
| ... | @@ -683,7 +684,7 @@ test "unix-scrypt" { | ... | @@ -683,7 +684,7 @@ test "unix-scrypt" { |
| 683 | } | 684 | } |
| 684 | 685 | ||
| 685 | test "crypt format" { | 686 | test "crypt format" { |
| 686 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | 687 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| 687 | 688 | ||
| 688 | const str = "$7$C6..../....SodiumChloride$kBGj9fHznVYFQMEn/qDCfrDevf9YDtcDdKvEqHJLV8D"; | 689 | const str = "$7$C6..../....SodiumChloride$kBGj9fHznVYFQMEn/qDCfrDevf9YDtcDdKvEqHJLV8D"; |
| 689 | const params = try crypt_format.deserialize(crypt_format.HashResult(32), str); | 690 | const params = try crypt_format.deserialize(crypt_format.HashResult(32), str); |
| ... | @@ -693,6 +694,8 @@ test "crypt format" { | ... | @@ -693,6 +694,8 @@ test "crypt format" { |
| 693 | } | 694 | } |
| 694 | 695 | ||
| 695 | test "kdf fast" { | 696 | test "kdf fast" { |
| 697 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 698 | |||
| 696 | const TestVector = struct { | 699 | const TestVector = struct { |
| 697 | password: []const u8, | 700 | password: []const u8, |
| 698 | salt: []const u8, | 701 | salt: []const u8, |
lib/std/debug.zig+2| ... | @@ -2513,6 +2513,8 @@ pub fn dumpStackPointerAddr(prefix: []const u8) void { | ... | @@ -2513,6 +2513,8 @@ pub fn dumpStackPointerAddr(prefix: []const u8) void { |
| 2513 | } | 2513 | } |
| 2514 | 2514 | ||
| 2515 | test "manage resources correctly" { | 2515 | test "manage resources correctly" { |
| 2516 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 2517 | |||
| 2516 | if (builtin.os.tag == .wasi) return error.SkipZigTest; | 2518 | if (builtin.os.tag == .wasi) return error.SkipZigTest; |
| 2517 | 2519 | ||
| 2518 | if (builtin.os.tag == .windows) { | 2520 | if (builtin.os.tag == .windows) { |
lib/std/dwarf/expressions.zig+2| ... | @@ -1054,6 +1054,8 @@ fn isOpcodeRegisterLocation(opcode: u8) bool { | ... | @@ -1054,6 +1054,8 @@ fn isOpcodeRegisterLocation(opcode: u8) bool { |
| 1054 | 1054 | ||
| 1055 | const testing = std.testing; | 1055 | const testing = std.testing; |
| 1056 | test "DWARF expressions" { | 1056 | test "DWARF expressions" { |
| 1057 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1058 | |||
| 1057 | const allocator = std.testing.allocator; | 1059 | const allocator = std.testing.allocator; |
| 1058 | 1060 | ||
| 1059 | const options = ExpressionOptions{}; | 1061 | const options = ExpressionOptions{}; |
lib/std/fifo.zig+2| ... | @@ -505,6 +505,8 @@ test "LinearFifo(u8, .Dynamic)" { | ... | @@ -505,6 +505,8 @@ test "LinearFifo(u8, .Dynamic)" { |
| 505 | } | 505 | } |
| 506 | 506 | ||
| 507 | test "LinearFifo" { | 507 | test "LinearFifo" { |
| 508 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 509 | |||
| 508 | inline for ([_]type{ u1, u8, u16, u64 }) |T| { | 510 | inline for ([_]type{ u1, u8, u16, u64 }) |T| { |
| 509 | inline for ([_]LinearFifoBufferType{ LinearFifoBufferType{ .Static = 32 }, .Slice, .Dynamic }) |bt| { | 511 | inline for ([_]LinearFifoBufferType{ LinearFifoBufferType{ .Static = 32 }, .Slice, .Dynamic }) |bt| { |
| 510 | const FifoType = LinearFifo(T, bt); | 512 | const FifoType = LinearFifo(T, bt); |
lib/std/fmt.zig+16| ... | @@ -2129,6 +2129,8 @@ test "int.small" { | ... | @@ -2129,6 +2129,8 @@ test "int.small" { |
| 2129 | } | 2129 | } |
| 2130 | 2130 | ||
| 2131 | test "int.specifier" { | 2131 | test "int.specifier" { |
| 2132 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 2133 | |||
| 2132 | { | 2134 | { |
| 2133 | const value: u8 = 'a'; | 2135 | const value: u8 = 'a'; |
| 2134 | try expectFmt("u8: a\n", "u8: {c}\n", .{value}); | 2136 | try expectFmt("u8: a\n", "u8: {c}\n", .{value}); |
| ... | @@ -2179,6 +2181,8 @@ test "int.padded" { | ... | @@ -2179,6 +2181,8 @@ test "int.padded" { |
| 2179 | } | 2181 | } |
| 2180 | 2182 | ||
| 2181 | test "buffer" { | 2183 | test "buffer" { |
| 2184 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 2185 | |||
| 2182 | { | 2186 | { |
| 2183 | var buf1: [32]u8 = undefined; | 2187 | var buf1: [32]u8 = undefined; |
| 2184 | var fbs = std.io.fixedBufferStream(&buf1); | 2188 | var fbs = std.io.fixedBufferStream(&buf1); |
| ... | @@ -2375,6 +2379,8 @@ test "float.scientific" { | ... | @@ -2375,6 +2379,8 @@ test "float.scientific" { |
| 2375 | } | 2379 | } |
| 2376 | 2380 | ||
| 2377 | test "float.scientific.precision" { | 2381 | test "float.scientific.precision" { |
| 2382 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 2383 | |||
| 2378 | try expectFmt("f64: 1.40971e-42", "f64: {e:.5}", .{@as(f64, 1.409706e-42)}); | 2384 | try expectFmt("f64: 1.40971e-42", "f64: {e:.5}", .{@as(f64, 1.409706e-42)}); |
| 2379 | try expectFmt("f64: 1.00000e-09", "f64: {e:.5}", .{@as(f64, @as(f32, @bitCast(@as(u32, 814313563))))}); | 2385 | try expectFmt("f64: 1.00000e-09", "f64: {e:.5}", .{@as(f64, @as(f32, @bitCast(@as(u32, 814313563))))}); |
| 2380 | try expectFmt("f64: 7.81250e-03", "f64: {e:.5}", .{@as(f64, @as(f32, @bitCast(@as(u32, 1006632960))))}); | 2386 | try expectFmt("f64: 7.81250e-03", "f64: {e:.5}", .{@as(f64, @as(f32, @bitCast(@as(u32, 1006632960))))}); |
| ... | @@ -2435,6 +2441,8 @@ test "float.hexadecimal" { | ... | @@ -2435,6 +2441,8 @@ test "float.hexadecimal" { |
| 2435 | } | 2441 | } |
| 2436 | 2442 | ||
| 2437 | test "float.hexadecimal.precision" { | 2443 | test "float.hexadecimal.precision" { |
| 2444 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 2445 | |||
| 2438 | try expectFmt("f16: 0x1.5p-2", "f16: {x:.1}", .{@as(f16, 1.0 / 3.0)}); | 2446 | try expectFmt("f16: 0x1.5p-2", "f16: {x:.1}", .{@as(f16, 1.0 / 3.0)}); |
| 2439 | try expectFmt("f32: 0x1.555p-2", "f32: {x:.3}", .{@as(f32, 1.0 / 3.0)}); | 2447 | try expectFmt("f32: 0x1.555p-2", "f32: {x:.3}", .{@as(f32, 1.0 / 3.0)}); |
| 2440 | try expectFmt("f64: 0x1.55555p-2", "f64: {x:.5}", .{@as(f64, 1.0 / 3.0)}); | 2448 | try expectFmt("f64: 0x1.55555p-2", "f64: {x:.5}", .{@as(f64, 1.0 / 3.0)}); |
| ... | @@ -2449,6 +2457,8 @@ test "float.hexadecimal.precision" { | ... | @@ -2449,6 +2457,8 @@ test "float.hexadecimal.precision" { |
| 2449 | } | 2457 | } |
| 2450 | 2458 | ||
| 2451 | test "float.decimal" { | 2459 | test "float.decimal" { |
| 2460 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 2461 | |||
| 2452 | try expectFmt("f64: 152314000000000000000000000000", "f64: {d}", .{@as(f64, 1.52314e+29)}); | 2462 | try expectFmt("f64: 152314000000000000000000000000", "f64: {d}", .{@as(f64, 1.52314e+29)}); |
| 2453 | try expectFmt("f32: 0", "f32: {d}", .{@as(f32, 0.0)}); | 2463 | try expectFmt("f32: 0", "f32: {d}", .{@as(f32, 0.0)}); |
| 2454 | try expectFmt("f32: 0", "f32: {d:.0}", .{@as(f32, 0.0)}); | 2464 | try expectFmt("f32: 0", "f32: {d:.0}", .{@as(f32, 0.0)}); |
| ... | @@ -2472,6 +2482,8 @@ test "float.decimal" { | ... | @@ -2472,6 +2482,8 @@ test "float.decimal" { |
| 2472 | } | 2482 | } |
| 2473 | 2483 | ||
| 2474 | test "float.libc.sanity" { | 2484 | test "float.libc.sanity" { |
| 2485 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 2486 | |||
| 2475 | try expectFmt("f64: 0.00001", "f64: {d:.5}", .{@as(f64, @as(f32, @bitCast(@as(u32, 916964781))))}); | 2487 | try expectFmt("f64: 0.00001", "f64: {d:.5}", .{@as(f64, @as(f32, @bitCast(@as(u32, 916964781))))}); |
| 2476 | try expectFmt("f64: 0.00001", "f64: {d:.5}", .{@as(f64, @as(f32, @bitCast(@as(u32, 925353389))))}); | 2488 | try expectFmt("f64: 0.00001", "f64: {d:.5}", .{@as(f64, @as(f32, @bitCast(@as(u32, 925353389))))}); |
| 2477 | try expectFmt("f64: 0.10000", "f64: {d:.5}", .{@as(f64, @as(f32, @bitCast(@as(u32, 1036831278))))}); | 2489 | try expectFmt("f64: 0.10000", "f64: {d:.5}", .{@as(f64, @as(f32, @bitCast(@as(u32, 1036831278))))}); |
| ... | @@ -2491,6 +2503,8 @@ test "float.libc.sanity" { | ... | @@ -2491,6 +2503,8 @@ test "float.libc.sanity" { |
| 2491 | } | 2503 | } |
| 2492 | 2504 | ||
| 2493 | test "custom" { | 2505 | test "custom" { |
| 2506 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 2507 | |||
| 2494 | const Vec2 = struct { | 2508 | const Vec2 = struct { |
| 2495 | const SelfType = @This(); | 2509 | const SelfType = @This(); |
| 2496 | x: f32, | 2510 | x: f32, |
| ... | @@ -2669,6 +2683,8 @@ test "formatFloatValue with comptime_float" { | ... | @@ -2669,6 +2683,8 @@ test "formatFloatValue with comptime_float" { |
| 2669 | } | 2683 | } |
| 2670 | 2684 | ||
| 2671 | test "formatType max_depth" { | 2685 | test "formatType max_depth" { |
| 2686 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 2687 | |||
| 2672 | const Vec2 = struct { | 2688 | const Vec2 = struct { |
| 2673 | const SelfType = @This(); | 2689 | const SelfType = @This(); |
| 2674 | x: f32, | 2690 | x: f32, |
lib/std/hash/auto_hash.zig+21| ... | @@ -1,5 +1,6 @@ | ... | @@ -1,5 +1,6 @@ |
| 1 | const std = @import("std"); | 1 | const std = @import("std"); |
| 2 | const assert = std.debug.assert; | 2 | const assert = std.debug.assert; |
| 3 | const builtin = @import("builtin"); | ||
| 3 | const mem = std.mem; | 4 | const mem = std.mem; |
| 4 | const meta = std.meta; | 5 | const meta = std.meta; |
| 5 | 6 | ||
| ... | @@ -252,6 +253,8 @@ test "typeContainsSlice" { | ... | @@ -252,6 +253,8 @@ test "typeContainsSlice" { |
| 252 | } | 253 | } |
| 253 | 254 | ||
| 254 | test "hash pointer" { | 255 | test "hash pointer" { |
| 256 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 257 | |||
| 255 | const array = [_]u32{ 123, 123, 123 }; | 258 | const array = [_]u32{ 123, 123, 123 }; |
| 256 | const a = &array[0]; | 259 | const a = &array[0]; |
| 257 | const b = &array[1]; | 260 | const b = &array[1]; |
| ... | @@ -272,6 +275,8 @@ test "hash pointer" { | ... | @@ -272,6 +275,8 @@ test "hash pointer" { |
| 272 | } | 275 | } |
| 273 | 276 | ||
| 274 | test "hash slice shallow" { | 277 | test "hash slice shallow" { |
| 278 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 279 | |||
| 275 | // Allocate one array dynamically so that we're assured it is not merged | 280 | // Allocate one array dynamically so that we're assured it is not merged |
| 276 | // with the other by the optimization passes. | 281 | // with the other by the optimization passes. |
| 277 | const array1 = try std.testing.allocator.create([6]u32); | 282 | const array1 = try std.testing.allocator.create([6]u32); |
| ... | @@ -290,6 +295,8 @@ test "hash slice shallow" { | ... | @@ -290,6 +295,8 @@ test "hash slice shallow" { |
| 290 | } | 295 | } |
| 291 | 296 | ||
| 292 | test "hash slice deep" { | 297 | test "hash slice deep" { |
| 298 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 299 | |||
| 293 | // Allocate one array dynamically so that we're assured it is not merged | 300 | // Allocate one array dynamically so that we're assured it is not merged |
| 294 | // with the other by the optimization passes. | 301 | // with the other by the optimization passes. |
| 295 | const array1 = try std.testing.allocator.create([6]u32); | 302 | const array1 = try std.testing.allocator.create([6]u32); |
| ... | @@ -306,6 +313,8 @@ test "hash slice deep" { | ... | @@ -306,6 +313,8 @@ test "hash slice deep" { |
| 306 | } | 313 | } |
| 307 | 314 | ||
| 308 | test "hash struct deep" { | 315 | test "hash struct deep" { |
| 316 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 317 | |||
| 309 | const Foo = struct { | 318 | const Foo = struct { |
| 310 | a: u32, | 319 | a: u32, |
| 311 | b: u16, | 320 | b: u16, |
| ... | @@ -345,6 +354,8 @@ test "hash struct deep" { | ... | @@ -345,6 +354,8 @@ test "hash struct deep" { |
| 345 | } | 354 | } |
| 346 | 355 | ||
| 347 | test "testHash optional" { | 356 | test "testHash optional" { |
| 357 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 358 | |||
| 348 | const a: ?u32 = 123; | 359 | const a: ?u32 = 123; |
| 349 | const b: ?u32 = null; | 360 | const b: ?u32 = null; |
| 350 | try testing.expectEqual(testHash(a), testHash(@as(u32, 123))); | 361 | try testing.expectEqual(testHash(a), testHash(@as(u32, 123))); |
| ... | @@ -353,6 +364,8 @@ test "testHash optional" { | ... | @@ -353,6 +364,8 @@ test "testHash optional" { |
| 353 | } | 364 | } |
| 354 | 365 | ||
| 355 | test "testHash array" { | 366 | test "testHash array" { |
| 367 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 368 | |||
| 356 | const a = [_]u32{ 1, 2, 3 }; | 369 | const a = [_]u32{ 1, 2, 3 }; |
| 357 | const h = testHash(a); | 370 | const h = testHash(a); |
| 358 | var hasher = Wyhash.init(0); | 371 | var hasher = Wyhash.init(0); |
| ... | @@ -369,6 +382,8 @@ test "testHash multi-dimensional array" { | ... | @@ -369,6 +382,8 @@ test "testHash multi-dimensional array" { |
| 369 | } | 382 | } |
| 370 | 383 | ||
| 371 | test "testHash struct" { | 384 | test "testHash struct" { |
| 385 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 386 | |||
| 372 | const Foo = struct { | 387 | const Foo = struct { |
| 373 | a: u32 = 1, | 388 | a: u32 = 1, |
| 374 | b: u32 = 2, | 389 | b: u32 = 2, |
| ... | @@ -384,6 +399,8 @@ test "testHash struct" { | ... | @@ -384,6 +399,8 @@ test "testHash struct" { |
| 384 | } | 399 | } |
| 385 | 400 | ||
| 386 | test "testHash union" { | 401 | test "testHash union" { |
| 402 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 403 | |||
| 387 | const Foo = union(enum) { | 404 | const Foo = union(enum) { |
| 388 | A: u32, | 405 | A: u32, |
| 389 | B: bool, | 406 | B: bool, |
| ... | @@ -408,6 +425,8 @@ test "testHash union" { | ... | @@ -408,6 +425,8 @@ test "testHash union" { |
| 408 | } | 425 | } |
| 409 | 426 | ||
| 410 | test "testHash vector" { | 427 | test "testHash vector" { |
| 428 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 429 | |||
| 411 | const a: @Vector(4, u32) = [_]u32{ 1, 2, 3, 4 }; | 430 | const a: @Vector(4, u32) = [_]u32{ 1, 2, 3, 4 }; |
| 412 | const b: @Vector(4, u32) = [_]u32{ 1, 2, 3, 5 }; | 431 | const b: @Vector(4, u32) = [_]u32{ 1, 2, 3, 5 }; |
| 413 | try testing.expect(testHash(a) == testHash(a)); | 432 | try testing.expect(testHash(a) == testHash(a)); |
| ... | @@ -420,6 +439,8 @@ test "testHash vector" { | ... | @@ -420,6 +439,8 @@ test "testHash vector" { |
| 420 | } | 439 | } |
| 421 | 440 | ||
| 422 | test "testHash error union" { | 441 | test "testHash error union" { |
| 442 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 443 | |||
| 423 | const Errors = error{Test}; | 444 | const Errors = error{Test}; |
| 424 | const Foo = struct { | 445 | const Foo = struct { |
| 425 | a: u32 = 1, | 446 | a: u32 = 1, |
lib/std/hash/wyhash.zig+2| ... | @@ -242,6 +242,8 @@ test "smhasher" { | ... | @@ -242,6 +242,8 @@ test "smhasher" { |
| 242 | } | 242 | } |
| 243 | 243 | ||
| 244 | test "iterative api" { | 244 | test "iterative api" { |
| 245 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 246 | |||
| 245 | const Test = struct { | 247 | const Test = struct { |
| 246 | fn do() !void { | 248 | fn do() !void { |
| 247 | try verify.iterativeApi(Wyhash); | 249 | try verify.iterativeApi(Wyhash); |
lib/std/hash_map.zig+2| ... | @@ -1872,6 +1872,8 @@ test "std.hash_map multiple removes on same metadata" { | ... | @@ -1872,6 +1872,8 @@ test "std.hash_map multiple removes on same metadata" { |
| 1872 | } | 1872 | } |
| 1873 | 1873 | ||
| 1874 | test "std.hash_map put and remove loop in random order" { | 1874 | test "std.hash_map put and remove loop in random order" { |
| 1875 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1876 | |||
| 1875 | var map = AutoHashMap(u32, u32).init(std.testing.allocator); | 1877 | var map = AutoHashMap(u32, u32).init(std.testing.allocator); |
| 1876 | defer map.deinit(); | 1878 | defer map.deinit(); |
| 1877 | 1879 |
lib/std/heap/general_purpose_allocator.zig+4| ... | @@ -1042,6 +1042,8 @@ const TraceKind = enum { | ... | @@ -1042,6 +1042,8 @@ const TraceKind = enum { |
| 1042 | const test_config = Config{}; | 1042 | const test_config = Config{}; |
| 1043 | 1043 | ||
| 1044 | test "small allocations - free in same order" { | 1044 | test "small allocations - free in same order" { |
| 1045 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1046 | |||
| 1045 | var gpa = GeneralPurposeAllocator(test_config){}; | 1047 | var gpa = GeneralPurposeAllocator(test_config){}; |
| 1046 | defer std.testing.expect(gpa.deinit() == .ok) catch @panic("leak"); | 1048 | defer std.testing.expect(gpa.deinit() == .ok) catch @panic("leak"); |
| 1047 | const allocator = gpa.allocator(); | 1049 | const allocator = gpa.allocator(); |
| ... | @@ -1061,6 +1063,8 @@ test "small allocations - free in same order" { | ... | @@ -1061,6 +1063,8 @@ test "small allocations - free in same order" { |
| 1061 | } | 1063 | } |
| 1062 | 1064 | ||
| 1063 | test "small allocations - free in reverse order" { | 1065 | test "small allocations - free in reverse order" { |
| 1066 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1067 | |||
| 1064 | var gpa = GeneralPurposeAllocator(test_config){}; | 1068 | var gpa = GeneralPurposeAllocator(test_config){}; |
| 1065 | defer std.testing.expect(gpa.deinit() == .ok) catch @panic("leak"); | 1069 | defer std.testing.expect(gpa.deinit() == .ok) catch @panic("leak"); |
| 1066 | const allocator = gpa.allocator(); | 1070 | const allocator = gpa.allocator(); |
lib/std/io/bit_reader.zig+2| ... | @@ -164,6 +164,8 @@ pub fn bitReader( | ... | @@ -164,6 +164,8 @@ pub fn bitReader( |
| 164 | } | 164 | } |
| 165 | 165 | ||
| 166 | test "api coverage" { | 166 | test "api coverage" { |
| 167 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 168 | |||
| 167 | const mem_be = [_]u8{ 0b11001101, 0b00001011 }; | 169 | const mem_be = [_]u8{ 0b11001101, 0b00001011 }; |
| 168 | const mem_le = [_]u8{ 0b00011101, 0b10010101 }; | 170 | const mem_le = [_]u8{ 0b00011101, 0b10010101 }; |
| 169 | 171 |
lib/std/json.zig+5-1| ... | @@ -38,12 +38,16 @@ test parseFromSlice { | ... | @@ -38,12 +38,16 @@ test parseFromSlice { |
| 38 | } | 38 | } |
| 39 | 39 | ||
| 40 | test Value { | 40 | test Value { |
| 41 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 42 | |||
| 41 | var parsed = try parseFromSlice(Value, testing.allocator, "{\"anything\": \"goes\"}", .{}); | 43 | var parsed = try parseFromSlice(Value, testing.allocator, "{\"anything\": \"goes\"}", .{}); |
| 42 | defer parsed.deinit(); | 44 | defer parsed.deinit(); |
| 43 | try testing.expectEqualSlices(u8, "goes", parsed.value.object.get("anything").?.string); | 45 | try testing.expectEqualSlices(u8, "goes", parsed.value.object.get("anything").?.string); |
| 44 | } | 46 | } |
| 45 | 47 | ||
| 46 | test writeStream { | 48 | test writeStream { |
| 49 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 50 | |||
| 47 | var out = ArrayList(u8).init(testing.allocator); | 51 | var out = ArrayList(u8).init(testing.allocator); |
| 48 | defer out.deinit(); | 52 | defer out.deinit(); |
| 49 | var write_stream = writeStream(out.writer(), .{ .whitespace = .indent_2 }); | 53 | var write_stream = writeStream(out.writer(), .{ .whitespace = .indent_2 }); |
| ... | @@ -61,7 +65,7 @@ test writeStream { | ... | @@ -61,7 +65,7 @@ test writeStream { |
| 61 | } | 65 | } |
| 62 | 66 | ||
| 63 | test stringify { | 67 | test stringify { |
| 64 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | 68 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| 65 | 69 | ||
| 66 | var out = ArrayList(u8).init(testing.allocator); | 70 | var out = ArrayList(u8).init(testing.allocator); |
| 67 | defer out.deinit(); | 71 | defer out.deinit(); |
lib/std/json/JSONTestSuite_test.zig+72| ... | @@ -104,6 +104,8 @@ test "i_string_utf16LE_no_BOM.json" { | ... | @@ -104,6 +104,8 @@ test "i_string_utf16LE_no_BOM.json" { |
| 104 | try any("[\x00\"\x00\xe9\x00\"\x00]\x00"); | 104 | try any("[\x00\"\x00\xe9\x00\"\x00]\x00"); |
| 105 | } | 105 | } |
| 106 | test "i_structure_500_nested_arrays.json" { | 106 | test "i_structure_500_nested_arrays.json" { |
| 107 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 108 | |||
| 107 | try any("[" ** 500 ++ "]" ** 500); | 109 | try any("[" ** 500 ++ "]" ** 500); |
| 108 | } | 110 | } |
| 109 | test "i_structure_UTF-8_BOM_empty_object.json" { | 111 | test "i_structure_UTF-8_BOM_empty_object.json" { |
| ... | @@ -359,15 +361,21 @@ test "n_object_bracket_key.json" { | ... | @@ -359,15 +361,21 @@ test "n_object_bracket_key.json" { |
| 359 | try err("{[: \"x\"}\n"); | 361 | try err("{[: \"x\"}\n"); |
| 360 | } | 362 | } |
| 361 | test "n_object_comma_instead_of_colon.json" { | 363 | test "n_object_comma_instead_of_colon.json" { |
| 364 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 365 | |||
| 362 | try err("{\"x\", null}"); | 366 | try err("{\"x\", null}"); |
| 363 | } | 367 | } |
| 364 | test "n_object_double_colon.json" { | 368 | test "n_object_double_colon.json" { |
| 369 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 370 | |||
| 365 | try err("{\"x\"::\"b\"}"); | 371 | try err("{\"x\"::\"b\"}"); |
| 366 | } | 372 | } |
| 367 | test "n_object_emoji.json" { | 373 | test "n_object_emoji.json" { |
| 368 | try err("{\xf0\x9f\x87\xa8\xf0\x9f\x87\xad}"); | 374 | try err("{\xf0\x9f\x87\xa8\xf0\x9f\x87\xad}"); |
| 369 | } | 375 | } |
| 370 | test "n_object_garbage_at_end.json" { | 376 | test "n_object_garbage_at_end.json" { |
| 377 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 378 | |||
| 371 | try err("{\"a\":\"a\" 123}"); | 379 | try err("{\"a\":\"a\" 123}"); |
| 372 | } | 380 | } |
| 373 | test "n_object_key_with_single_quotes.json" { | 381 | test "n_object_key_with_single_quotes.json" { |
| ... | @@ -377,18 +385,26 @@ test "n_object_lone_continuation_byte_in_key_and_trailing_comma.json" { | ... | @@ -377,18 +385,26 @@ test "n_object_lone_continuation_byte_in_key_and_trailing_comma.json" { |
| 377 | try err("{\"\xb9\":\"0\",}"); | 385 | try err("{\"\xb9\":\"0\",}"); |
| 378 | } | 386 | } |
| 379 | test "n_object_missing_colon.json" { | 387 | test "n_object_missing_colon.json" { |
| 388 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 389 | |||
| 380 | try err("{\"a\" b}"); | 390 | try err("{\"a\" b}"); |
| 381 | } | 391 | } |
| 382 | test "n_object_missing_key.json" { | 392 | test "n_object_missing_key.json" { |
| 383 | try err("{:\"b\"}"); | 393 | try err("{:\"b\"}"); |
| 384 | } | 394 | } |
| 385 | test "n_object_missing_semicolon.json" { | 395 | test "n_object_missing_semicolon.json" { |
| 396 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 397 | |||
| 386 | try err("{\"a\" \"b\"}"); | 398 | try err("{\"a\" \"b\"}"); |
| 387 | } | 399 | } |
| 388 | test "n_object_missing_value.json" { | 400 | test "n_object_missing_value.json" { |
| 401 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 402 | |||
| 389 | try err("{\"a\":"); | 403 | try err("{\"a\":"); |
| 390 | } | 404 | } |
| 391 | test "n_object_no-colon.json" { | 405 | test "n_object_no-colon.json" { |
| 406 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 407 | |||
| 392 | try err("{\"a\""); | 408 | try err("{\"a\""); |
| 393 | } | 409 | } |
| 394 | test "n_object_non_string_key.json" { | 410 | test "n_object_non_string_key.json" { |
| ... | @@ -401,39 +417,59 @@ test "n_object_repeated_null_null.json" { | ... | @@ -401,39 +417,59 @@ test "n_object_repeated_null_null.json" { |
| 401 | try err("{null:null,null:null}"); | 417 | try err("{null:null,null:null}"); |
| 402 | } | 418 | } |
| 403 | test "n_object_several_trailing_commas.json" { | 419 | test "n_object_several_trailing_commas.json" { |
| 420 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 421 | |||
| 404 | try err("{\"id\":0,,,,,}"); | 422 | try err("{\"id\":0,,,,,}"); |
| 405 | } | 423 | } |
| 406 | test "n_object_single_quote.json" { | 424 | test "n_object_single_quote.json" { |
| 407 | try err("{'a':0}"); | 425 | try err("{'a':0}"); |
| 408 | } | 426 | } |
| 409 | test "n_object_trailing_comma.json" { | 427 | test "n_object_trailing_comma.json" { |
| 428 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 429 | |||
| 410 | try err("{\"id\":0,}"); | 430 | try err("{\"id\":0,}"); |
| 411 | } | 431 | } |
| 412 | test "n_object_trailing_comment.json" { | 432 | test "n_object_trailing_comment.json" { |
| 433 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 434 | |||
| 413 | try err("{\"a\":\"b\"}/**/"); | 435 | try err("{\"a\":\"b\"}/**/"); |
| 414 | } | 436 | } |
| 415 | test "n_object_trailing_comment_open.json" { | 437 | test "n_object_trailing_comment_open.json" { |
| 438 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 439 | |||
| 416 | try err("{\"a\":\"b\"}/**//"); | 440 | try err("{\"a\":\"b\"}/**//"); |
| 417 | } | 441 | } |
| 418 | test "n_object_trailing_comment_slash_open.json" { | 442 | test "n_object_trailing_comment_slash_open.json" { |
| 443 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 444 | |||
| 419 | try err("{\"a\":\"b\"}//"); | 445 | try err("{\"a\":\"b\"}//"); |
| 420 | } | 446 | } |
| 421 | test "n_object_trailing_comment_slash_open_incomplete.json" { | 447 | test "n_object_trailing_comment_slash_open_incomplete.json" { |
| 448 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 449 | |||
| 422 | try err("{\"a\":\"b\"}/"); | 450 | try err("{\"a\":\"b\"}/"); |
| 423 | } | 451 | } |
| 424 | test "n_object_two_commas_in_a_row.json" { | 452 | test "n_object_two_commas_in_a_row.json" { |
| 453 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 454 | |||
| 425 | try err("{\"a\":\"b\",,\"c\":\"d\"}"); | 455 | try err("{\"a\":\"b\",,\"c\":\"d\"}"); |
| 426 | } | 456 | } |
| 427 | test "n_object_unquoted_key.json" { | 457 | test "n_object_unquoted_key.json" { |
| 428 | try err("{a: \"b\"}"); | 458 | try err("{a: \"b\"}"); |
| 429 | } | 459 | } |
| 430 | test "n_object_unterminated-value.json" { | 460 | test "n_object_unterminated-value.json" { |
| 461 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 462 | |||
| 431 | try err("{\"a\":\"a"); | 463 | try err("{\"a\":\"a"); |
| 432 | } | 464 | } |
| 433 | test "n_object_with_single_string.json" { | 465 | test "n_object_with_single_string.json" { |
| 466 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 467 | |||
| 434 | try err("{ \"foo\" : \"bar\", \"a\" }"); | 468 | try err("{ \"foo\" : \"bar\", \"a\" }"); |
| 435 | } | 469 | } |
| 436 | test "n_object_with_trailing_garbage.json" { | 470 | test "n_object_with_trailing_garbage.json" { |
| 471 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 472 | |||
| 437 | try err("{\"a\":\"b\"}#"); | 473 | try err("{\"a\":\"b\"}#"); |
| 438 | } | 474 | } |
| 439 | test "n_single_space.json" { | 475 | test "n_single_space.json" { |
| ... | @@ -560,6 +596,8 @@ test "n_structure_close_unopened_array.json" { | ... | @@ -560,6 +596,8 @@ test "n_structure_close_unopened_array.json" { |
| 560 | try err("1]"); | 596 | try err("1]"); |
| 561 | } | 597 | } |
| 562 | test "n_structure_comma_instead_of_closing_brace.json" { | 598 | test "n_structure_comma_instead_of_closing_brace.json" { |
| 599 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 600 | |||
| 563 | try err("{\"x\": true,"); | 601 | try err("{\"x\": true,"); |
| 564 | } | 602 | } |
| 565 | test "n_structure_double_array.json" { | 603 | test "n_structure_double_array.json" { |
| ... | @@ -590,12 +628,18 @@ test "n_structure_object_followed_by_closing_object.json" { | ... | @@ -590,12 +628,18 @@ test "n_structure_object_followed_by_closing_object.json" { |
| 590 | try err("{}}"); | 628 | try err("{}}"); |
| 591 | } | 629 | } |
| 592 | test "n_structure_object_unclosed_no_value.json" { | 630 | test "n_structure_object_unclosed_no_value.json" { |
| 631 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 632 | |||
| 593 | try err("{\"\":"); | 633 | try err("{\"\":"); |
| 594 | } | 634 | } |
| 595 | test "n_structure_object_with_comment.json" { | 635 | test "n_structure_object_with_comment.json" { |
| 636 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 637 | |||
| 596 | try err("{\"a\":/*comment*/\"b\"}"); | 638 | try err("{\"a\":/*comment*/\"b\"}"); |
| 597 | } | 639 | } |
| 598 | test "n_structure_object_with_trailing_garbage.json" { | 640 | test "n_structure_object_with_trailing_garbage.json" { |
| 641 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 642 | |||
| 599 | try err("{\"a\": true} \"x\""); | 643 | try err("{\"a\": true} \"x\""); |
| 600 | } | 644 | } |
| 601 | test "n_structure_open_array_apostrophe.json" { | 645 | test "n_structure_open_array_apostrophe.json" { |
| ... | @@ -605,6 +649,8 @@ test "n_structure_open_array_comma.json" { | ... | @@ -605,6 +649,8 @@ test "n_structure_open_array_comma.json" { |
| 605 | try err("[,"); | 649 | try err("[,"); |
| 606 | } | 650 | } |
| 607 | test "n_structure_open_array_object.json" { | 651 | test "n_structure_open_array_object.json" { |
| 652 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 653 | |||
| 608 | try err("[{\"\":" ** 50000 ++ "\n"); | 654 | try err("[{\"\":" ** 50000 ++ "\n"); |
| 609 | } | 655 | } |
| 610 | test "n_structure_open_array_open_object.json" { | 656 | test "n_structure_open_array_open_object.json" { |
| ... | @@ -644,6 +690,8 @@ test "n_structure_single_star.json" { | ... | @@ -644,6 +690,8 @@ test "n_structure_single_star.json" { |
| 644 | try err("*"); | 690 | try err("*"); |
| 645 | } | 691 | } |
| 646 | test "n_structure_trailing_#.json" { | 692 | test "n_structure_trailing_#.json" { |
| 693 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 694 | |||
| 647 | try err("{\"a\":\"b\"}#{}"); | 695 | try err("{\"a\":\"b\"}#{}"); |
| 648 | } | 696 | } |
| 649 | test "n_structure_uescaped_LF_before_string.json" { | 697 | test "n_structure_uescaped_LF_before_string.json" { |
| ... | @@ -662,6 +710,8 @@ test "n_structure_unclosed_array_unfinished_true.json" { | ... | @@ -662,6 +710,8 @@ test "n_structure_unclosed_array_unfinished_true.json" { |
| 662 | try err("[ false, tru"); | 710 | try err("[ false, tru"); |
| 663 | } | 711 | } |
| 664 | test "n_structure_unclosed_object.json" { | 712 | test "n_structure_unclosed_object.json" { |
| 713 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 714 | |||
| 665 | try err("{\"asd\":\"asd\""); | 715 | try err("{\"asd\":\"asd\""); |
| 666 | } | 716 | } |
| 667 | test "n_structure_unicode-identifier.json" { | 717 | test "n_structure_unicode-identifier.json" { |
| ... | @@ -764,39 +814,61 @@ test "y_number_simple_real.json" { | ... | @@ -764,39 +814,61 @@ test "y_number_simple_real.json" { |
| 764 | try ok("[123.456789]"); | 814 | try ok("[123.456789]"); |
| 765 | } | 815 | } |
| 766 | test "y_object.json" { | 816 | test "y_object.json" { |
| 817 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 818 | |||
| 767 | try ok("{\"asd\":\"sdf\", \"dfg\":\"fgh\"}"); | 819 | try ok("{\"asd\":\"sdf\", \"dfg\":\"fgh\"}"); |
| 768 | } | 820 | } |
| 769 | test "y_object_basic.json" { | 821 | test "y_object_basic.json" { |
| 822 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 823 | |||
| 770 | try ok("{\"asd\":\"sdf\"}"); | 824 | try ok("{\"asd\":\"sdf\"}"); |
| 771 | } | 825 | } |
| 772 | test "y_object_duplicated_key.json" { | 826 | test "y_object_duplicated_key.json" { |
| 827 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 828 | |||
| 773 | try ok("{\"a\":\"b\",\"a\":\"c\"}"); | 829 | try ok("{\"a\":\"b\",\"a\":\"c\"}"); |
| 774 | } | 830 | } |
| 775 | test "y_object_duplicated_key_and_value.json" { | 831 | test "y_object_duplicated_key_and_value.json" { |
| 832 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 833 | |||
| 776 | try ok("{\"a\":\"b\",\"a\":\"b\"}"); | 834 | try ok("{\"a\":\"b\",\"a\":\"b\"}"); |
| 777 | } | 835 | } |
| 778 | test "y_object_empty.json" { | 836 | test "y_object_empty.json" { |
| 779 | try ok("{}"); | 837 | try ok("{}"); |
| 780 | } | 838 | } |
| 781 | test "y_object_empty_key.json" { | 839 | test "y_object_empty_key.json" { |
| 840 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 841 | |||
| 782 | try ok("{\"\":0}"); | 842 | try ok("{\"\":0}"); |
| 783 | } | 843 | } |
| 784 | test "y_object_escaped_null_in_key.json" { | 844 | test "y_object_escaped_null_in_key.json" { |
| 845 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 846 | |||
| 785 | try ok("{\"foo\\u0000bar\": 42}"); | 847 | try ok("{\"foo\\u0000bar\": 42}"); |
| 786 | } | 848 | } |
| 787 | test "y_object_extreme_numbers.json" { | 849 | test "y_object_extreme_numbers.json" { |
| 850 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 851 | |||
| 788 | try ok("{ \"min\": -1.0e+28, \"max\": 1.0e+28 }"); | 852 | try ok("{ \"min\": -1.0e+28, \"max\": 1.0e+28 }"); |
| 789 | } | 853 | } |
| 790 | test "y_object_long_strings.json" { | 854 | test "y_object_long_strings.json" { |
| 855 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 856 | |||
| 791 | try ok("{\"x\":[{\"id\": \"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\"}], \"id\": \"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\"}"); | 857 | try ok("{\"x\":[{\"id\": \"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\"}], \"id\": \"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\"}"); |
| 792 | } | 858 | } |
| 793 | test "y_object_simple.json" { | 859 | test "y_object_simple.json" { |
| 860 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 861 | |||
| 794 | try ok("{\"a\":[]}"); | 862 | try ok("{\"a\":[]}"); |
| 795 | } | 863 | } |
| 796 | test "y_object_string_unicode.json" { | 864 | test "y_object_string_unicode.json" { |
| 865 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 866 | |||
| 797 | try ok("{\"title\":\"\\u041f\\u043e\\u043b\\u0442\\u043e\\u0440\\u0430 \\u0417\\u0435\\u043c\\u043b\\u0435\\u043a\\u043e\\u043f\\u0430\" }"); | 867 | try ok("{\"title\":\"\\u041f\\u043e\\u043b\\u0442\\u043e\\u0440\\u0430 \\u0417\\u0435\\u043c\\u043b\\u0435\\u043a\\u043e\\u043f\\u0430\" }"); |
| 798 | } | 868 | } |
| 799 | test "y_object_with_newlines.json" { | 869 | test "y_object_with_newlines.json" { |
| 870 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 871 | |||
| 800 | try ok("{\n\"a\": \"b\"\n}"); | 872 | try ok("{\n\"a\": \"b\"\n}"); |
| 801 | } | 873 | } |
| 802 | test "y_string_1_2_3_bytes_UTF-8_sequences.json" { | 874 | test "y_string_1_2_3_bytes_UTF-8_sequences.json" { |
lib/std/json/test.zig+4-1| ... | @@ -1,4 +1,5 @@ | ... | @@ -1,4 +1,5 @@ |
| 1 | const std = @import("std"); | 1 | const std = @import("std"); |
| 2 | const builtin = @import("builtin"); | ||
| 2 | const testing = std.testing; | 3 | const testing = std.testing; |
| 3 | const parseFromSlice = @import("./static.zig").parseFromSlice; | 4 | const parseFromSlice = @import("./static.zig").parseFromSlice; |
| 4 | const validate = @import("./scanner.zig").validate; | 5 | const validate = @import("./scanner.zig").validate; |
| ... | @@ -34,13 +35,15 @@ fn testHighLevelDynamicParser(s: []const u8) !void { | ... | @@ -34,13 +35,15 @@ fn testHighLevelDynamicParser(s: []const u8) !void { |
| 34 | 35 | ||
| 35 | // Additional tests not part of test JSONTestSuite. | 36 | // Additional tests not part of test JSONTestSuite. |
| 36 | test "y_trailing_comma_after_empty" { | 37 | test "y_trailing_comma_after_empty" { |
| 37 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | 38 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| 38 | 39 | ||
| 39 | try roundTrip( | 40 | try roundTrip( |
| 40 | \\{"1":[],"2":{},"3":"4"} | 41 | \\{"1":[],"2":{},"3":"4"} |
| 41 | ); | 42 | ); |
| 42 | } | 43 | } |
| 43 | test "n_object_closed_missing_value" { | 44 | test "n_object_closed_missing_value" { |
| 45 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 46 | |||
| 44 | try err( | 47 | try err( |
| 45 | \\{"a":} | 48 | \\{"a":} |
| 46 | ); | 49 | ); |
lib/std/leb128.zig+4| ... | @@ -215,6 +215,8 @@ fn test_read_uleb128_seq(comptime T: type, comptime N: usize, encoded: []const u | ... | @@ -215,6 +215,8 @@ fn test_read_uleb128_seq(comptime T: type, comptime N: usize, encoded: []const u |
| 215 | } | 215 | } |
| 216 | 216 | ||
| 217 | test "deserialize signed LEB128" { | 217 | test "deserialize signed LEB128" { |
| 218 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 219 | |||
| 218 | // Truncated | 220 | // Truncated |
| 219 | try testing.expectError(error.EndOfStream, test_read_stream_ileb128(i64, "\x80")); | 221 | try testing.expectError(error.EndOfStream, test_read_stream_ileb128(i64, "\x80")); |
| 220 | 222 | ||
| ... | @@ -361,6 +363,8 @@ test "serialize unsigned LEB128" { | ... | @@ -361,6 +363,8 @@ test "serialize unsigned LEB128" { |
| 361 | } | 363 | } |
| 362 | 364 | ||
| 363 | test "serialize signed LEB128" { | 365 | test "serialize signed LEB128" { |
| 366 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 367 | |||
| 364 | // explicitly test i0 because starting `t` at 0 | 368 | // explicitly test i0 because starting `t` at 0 |
| 365 | // will break the while loop | 369 | // will break the while loop |
| 366 | try test_write_leb128(@as(i0, 0)); | 370 | try test_write_leb128(@as(i0, 0)); |
lib/std/math/big/int_test.zig+122-8| ... | @@ -71,6 +71,8 @@ test "big.int set negative minimum" { | ... | @@ -71,6 +71,8 @@ test "big.int set negative minimum" { |
| 71 | } | 71 | } |
| 72 | 72 | ||
| 73 | test "big.int set double-width maximum then zero" { | 73 | test "big.int set double-width maximum then zero" { |
| 74 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 75 | |||
| 74 | var a = try Managed.initSet(testing.allocator, maxInt(DoubleLimb)); | 76 | var a = try Managed.initSet(testing.allocator, maxInt(DoubleLimb)); |
| 75 | defer a.deinit(); | 77 | defer a.deinit(); |
| 76 | try a.set(@as(DoubleLimb, 0)); | 78 | try a.set(@as(DoubleLimb, 0)); |
| ... | @@ -244,6 +246,8 @@ test "big.int fits" { | ... | @@ -244,6 +246,8 @@ test "big.int fits" { |
| 244 | } | 246 | } |
| 245 | 247 | ||
| 246 | test "big.int string set" { | 248 | test "big.int string set" { |
| 249 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 250 | |||
| 247 | var a = try Managed.init(testing.allocator); | 251 | var a = try Managed.init(testing.allocator); |
| 248 | defer a.deinit(); | 252 | defer a.deinit(); |
| 249 | 253 | ||
| ... | @@ -260,6 +264,8 @@ test "big.int string negative" { | ... | @@ -260,6 +264,8 @@ test "big.int string negative" { |
| 260 | } | 264 | } |
| 261 | 265 | ||
| 262 | test "big.int string set number with underscores" { | 266 | test "big.int string set number with underscores" { |
| 267 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 268 | |||
| 263 | var a = try Managed.init(testing.allocator); | 269 | var a = try Managed.init(testing.allocator); |
| 264 | defer a.deinit(); | 270 | defer a.deinit(); |
| 265 | 271 | ||
| ... | @@ -268,6 +274,8 @@ test "big.int string set number with underscores" { | ... | @@ -268,6 +274,8 @@ test "big.int string set number with underscores" { |
| 268 | } | 274 | } |
| 269 | 275 | ||
| 270 | test "big.int string set case insensitive number" { | 276 | test "big.int string set case insensitive number" { |
| 277 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 278 | |||
| 271 | var a = try Managed.init(testing.allocator); | 279 | var a = try Managed.init(testing.allocator); |
| 272 | defer a.deinit(); | 280 | defer a.deinit(); |
| 273 | 281 | ||
| ... | @@ -318,6 +326,8 @@ test "big.int twos complement limit set" { | ... | @@ -318,6 +326,8 @@ test "big.int twos complement limit set" { |
| 318 | } | 326 | } |
| 319 | 327 | ||
| 320 | test "big.int string to" { | 328 | test "big.int string to" { |
| 329 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 330 | |||
| 321 | var a = try Managed.initSet(testing.allocator, 120317241209124781241290847124); | 331 | var a = try Managed.initSet(testing.allocator, 120317241209124781241290847124); |
| 322 | defer a.deinit(); | 332 | defer a.deinit(); |
| 323 | 333 | ||
| ... | @@ -358,6 +368,8 @@ test "big.int string to base 16" { | ... | @@ -358,6 +368,8 @@ test "big.int string to base 16" { |
| 358 | } | 368 | } |
| 359 | 369 | ||
| 360 | test "big.int neg string to" { | 370 | test "big.int neg string to" { |
| 371 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 372 | |||
| 361 | var a = try Managed.initSet(testing.allocator, -123907434); | 373 | var a = try Managed.initSet(testing.allocator, -123907434); |
| 362 | defer a.deinit(); | 374 | defer a.deinit(); |
| 363 | 375 | ||
| ... | @@ -380,6 +392,8 @@ test "big.int zero string to" { | ... | @@ -380,6 +392,8 @@ test "big.int zero string to" { |
| 380 | } | 392 | } |
| 381 | 393 | ||
| 382 | test "big.int clone" { | 394 | test "big.int clone" { |
| 395 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 396 | |||
| 383 | var a = try Managed.initSet(testing.allocator, 1234); | 397 | var a = try Managed.initSet(testing.allocator, 1234); |
| 384 | defer a.deinit(); | 398 | defer a.deinit(); |
| 385 | var b = try a.clone(); | 399 | var b = try a.clone(); |
| ... | @@ -517,6 +531,8 @@ test "big.int add multi-single" { | ... | @@ -517,6 +531,8 @@ test "big.int add multi-single" { |
| 517 | } | 531 | } |
| 518 | 532 | ||
| 519 | test "big.int add multi-multi" { | 533 | test "big.int add multi-multi" { |
| 534 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 535 | |||
| 520 | var op1: u128 = 0xefefefef7f7f7f7f; | 536 | var op1: u128 = 0xefefefef7f7f7f7f; |
| 521 | var op2: u128 = 0xfefefefe9f9f9f9f; | 537 | var op2: u128 = 0xfefefefe9f9f9f9f; |
| 522 | var a = try Managed.initSet(testing.allocator, op1); | 538 | var a = try Managed.initSet(testing.allocator, op1); |
| ... | @@ -618,6 +634,8 @@ test "big.int addWrap single-single, unsigned" { | ... | @@ -618,6 +634,8 @@ test "big.int addWrap single-single, unsigned" { |
| 618 | } | 634 | } |
| 619 | 635 | ||
| 620 | test "big.int subWrap single-single, unsigned" { | 636 | test "big.int subWrap single-single, unsigned" { |
| 637 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 638 | |||
| 621 | var a = try Managed.initSet(testing.allocator, 0); | 639 | var a = try Managed.initSet(testing.allocator, 0); |
| 622 | defer a.deinit(); | 640 | defer a.deinit(); |
| 623 | 641 | ||
| ... | @@ -631,6 +649,8 @@ test "big.int subWrap single-single, unsigned" { | ... | @@ -631,6 +649,8 @@ test "big.int subWrap single-single, unsigned" { |
| 631 | } | 649 | } |
| 632 | 650 | ||
| 633 | test "big.int addWrap multi-multi, unsigned, limb aligned" { | 651 | test "big.int addWrap multi-multi, unsigned, limb aligned" { |
| 652 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 653 | |||
| 634 | var a = try Managed.initSet(testing.allocator, maxInt(DoubleLimb)); | 654 | var a = try Managed.initSet(testing.allocator, maxInt(DoubleLimb)); |
| 635 | defer a.deinit(); | 655 | defer a.deinit(); |
| 636 | 656 | ||
| ... | @@ -683,6 +703,8 @@ test "big.int subWrap single-single, signed" { | ... | @@ -683,6 +703,8 @@ test "big.int subWrap single-single, signed" { |
| 683 | } | 703 | } |
| 684 | 704 | ||
| 685 | test "big.int addWrap multi-multi, signed, limb aligned" { | 705 | test "big.int addWrap multi-multi, signed, limb aligned" { |
| 706 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 707 | |||
| 686 | var a = try Managed.initSet(testing.allocator, maxInt(SignedDoubleLimb)); | 708 | var a = try Managed.initSet(testing.allocator, maxInt(SignedDoubleLimb)); |
| 687 | defer a.deinit(); | 709 | defer a.deinit(); |
| 688 | 710 | ||
| ... | @@ -733,6 +755,8 @@ test "big.int subSat single-single, unsigned" { | ... | @@ -733,6 +755,8 @@ test "big.int subSat single-single, unsigned" { |
| 733 | } | 755 | } |
| 734 | 756 | ||
| 735 | test "big.int addSat multi-multi, unsigned, limb aligned" { | 757 | test "big.int addSat multi-multi, unsigned, limb aligned" { |
| 758 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 759 | |||
| 736 | var a = try Managed.initSet(testing.allocator, maxInt(DoubleLimb)); | 760 | var a = try Managed.initSet(testing.allocator, maxInt(DoubleLimb)); |
| 737 | defer a.deinit(); | 761 | defer a.deinit(); |
| 738 | 762 | ||
| ... | @@ -818,6 +842,8 @@ test "big.int sub single-single" { | ... | @@ -818,6 +842,8 @@ test "big.int sub single-single" { |
| 818 | } | 842 | } |
| 819 | 843 | ||
| 820 | test "big.int sub multi-single" { | 844 | test "big.int sub multi-single" { |
| 845 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 846 | |||
| 821 | var a = try Managed.initSet(testing.allocator, maxInt(Limb) + 1); | 847 | var a = try Managed.initSet(testing.allocator, maxInt(Limb) + 1); |
| 822 | defer a.deinit(); | 848 | defer a.deinit(); |
| 823 | var b = try Managed.initSet(testing.allocator, 1); | 849 | var b = try Managed.initSet(testing.allocator, 1); |
| ... | @@ -831,6 +857,8 @@ test "big.int sub multi-single" { | ... | @@ -831,6 +857,8 @@ test "big.int sub multi-single" { |
| 831 | } | 857 | } |
| 832 | 858 | ||
| 833 | test "big.int sub multi-multi" { | 859 | test "big.int sub multi-multi" { |
| 860 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 861 | |||
| 834 | var op1: u128 = 0xefefefefefefefefefefefef; | 862 | var op1: u128 = 0xefefefefefefefefefefefef; |
| 835 | var op2: u128 = 0xabababababababababababab; | 863 | var op2: u128 = 0xabababababababababababab; |
| 836 | 864 | ||
| ... | @@ -935,6 +963,8 @@ test "big.int mul multi-multi" { | ... | @@ -935,6 +963,8 @@ test "big.int mul multi-multi" { |
| 935 | } | 963 | } |
| 936 | 964 | ||
| 937 | test "big.int mul alias r with a" { | 965 | test "big.int mul alias r with a" { |
| 966 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 967 | |||
| 938 | var a = try Managed.initSet(testing.allocator, maxInt(Limb)); | 968 | var a = try Managed.initSet(testing.allocator, maxInt(Limb)); |
| 939 | defer a.deinit(); | 969 | defer a.deinit(); |
| 940 | var b = try Managed.initSet(testing.allocator, 2); | 970 | var b = try Managed.initSet(testing.allocator, 2); |
| ... | @@ -946,6 +976,8 @@ test "big.int mul alias r with a" { | ... | @@ -946,6 +976,8 @@ test "big.int mul alias r with a" { |
| 946 | } | 976 | } |
| 947 | 977 | ||
| 948 | test "big.int mul alias r with b" { | 978 | test "big.int mul alias r with b" { |
| 979 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 980 | |||
| 949 | var a = try Managed.initSet(testing.allocator, maxInt(Limb)); | 981 | var a = try Managed.initSet(testing.allocator, maxInt(Limb)); |
| 950 | defer a.deinit(); | 982 | defer a.deinit(); |
| 951 | var b = try Managed.initSet(testing.allocator, 2); | 983 | var b = try Managed.initSet(testing.allocator, 2); |
| ... | @@ -957,6 +989,8 @@ test "big.int mul alias r with b" { | ... | @@ -957,6 +989,8 @@ test "big.int mul alias r with b" { |
| 957 | } | 989 | } |
| 958 | 990 | ||
| 959 | test "big.int mul alias r with a and b" { | 991 | test "big.int mul alias r with a and b" { |
| 992 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 993 | |||
| 960 | var a = try Managed.initSet(testing.allocator, maxInt(Limb)); | 994 | var a = try Managed.initSet(testing.allocator, maxInt(Limb)); |
| 961 | defer a.deinit(); | 995 | defer a.deinit(); |
| 962 | 996 | ||
| ... | @@ -992,6 +1026,8 @@ test "big.int mul 0*0" { | ... | @@ -992,6 +1026,8 @@ test "big.int mul 0*0" { |
| 992 | } | 1026 | } |
| 993 | 1027 | ||
| 994 | test "big.int mul large" { | 1028 | test "big.int mul large" { |
| 1029 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1030 | |||
| 995 | var a = try Managed.initCapacity(testing.allocator, 50); | 1031 | var a = try Managed.initCapacity(testing.allocator, 50); |
| 996 | defer a.deinit(); | 1032 | defer a.deinit(); |
| 997 | var b = try Managed.initCapacity(testing.allocator, 100); | 1033 | var b = try Managed.initCapacity(testing.allocator, 100); |
| ... | @@ -1077,6 +1113,8 @@ test "big.int mulWrap multi-multi signed" { | ... | @@ -1077,6 +1113,8 @@ test "big.int mulWrap multi-multi signed" { |
| 1077 | } | 1113 | } |
| 1078 | 1114 | ||
| 1079 | test "big.int mulWrap large" { | 1115 | test "big.int mulWrap large" { |
| 1116 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1117 | |||
| 1080 | var a = try Managed.initCapacity(testing.allocator, 50); | 1118 | var a = try Managed.initCapacity(testing.allocator, 50); |
| 1081 | defer a.deinit(); | 1119 | defer a.deinit(); |
| 1082 | var b = try Managed.initCapacity(testing.allocator, 100); | 1120 | var b = try Managed.initCapacity(testing.allocator, 100); |
| ... | @@ -1133,6 +1171,8 @@ test "big.int div single-half with rem" { | ... | @@ -1133,6 +1171,8 @@ test "big.int div single-half with rem" { |
| 1133 | } | 1171 | } |
| 1134 | 1172 | ||
| 1135 | test "big.int div single-single no rem" { | 1173 | test "big.int div single-single no rem" { |
| 1174 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1175 | |||
| 1136 | // assumes usize is <= 64 bits. | 1176 | // assumes usize is <= 64 bits. |
| 1137 | var a = try Managed.initSet(testing.allocator, 1 << 52); | 1177 | var a = try Managed.initSet(testing.allocator, 1 << 52); |
| 1138 | defer a.deinit(); | 1178 | defer a.deinit(); |
| ... | @@ -1150,6 +1190,8 @@ test "big.int div single-single no rem" { | ... | @@ -1150,6 +1190,8 @@ test "big.int div single-single no rem" { |
| 1150 | } | 1190 | } |
| 1151 | 1191 | ||
| 1152 | test "big.int div single-single with rem" { | 1192 | test "big.int div single-single with rem" { |
| 1193 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1194 | |||
| 1153 | var a = try Managed.initSet(testing.allocator, (1 << 52) | (1 << 33)); | 1195 | var a = try Managed.initSet(testing.allocator, (1 << 52) | (1 << 33)); |
| 1154 | defer a.deinit(); | 1196 | defer a.deinit(); |
| 1155 | var b = try Managed.initSet(testing.allocator, (1 << 35)); | 1197 | var b = try Managed.initSet(testing.allocator, (1 << 35)); |
| ... | @@ -1166,6 +1208,8 @@ test "big.int div single-single with rem" { | ... | @@ -1166,6 +1208,8 @@ test "big.int div single-single with rem" { |
| 1166 | } | 1208 | } |
| 1167 | 1209 | ||
| 1168 | test "big.int div multi-single no rem" { | 1210 | test "big.int div multi-single no rem" { |
| 1211 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1212 | |||
| 1169 | var op1: u128 = 0xffffeeeeddddcccc; | 1213 | var op1: u128 = 0xffffeeeeddddcccc; |
| 1170 | var op2: u128 = 34; | 1214 | var op2: u128 = 34; |
| 1171 | 1215 | ||
| ... | @@ -1185,6 +1229,8 @@ test "big.int div multi-single no rem" { | ... | @@ -1185,6 +1229,8 @@ test "big.int div multi-single no rem" { |
| 1185 | } | 1229 | } |
| 1186 | 1230 | ||
| 1187 | test "big.int div multi-single with rem" { | 1231 | test "big.int div multi-single with rem" { |
| 1232 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1233 | |||
| 1188 | var op1: u128 = 0xffffeeeeddddcccf; | 1234 | var op1: u128 = 0xffffeeeeddddcccf; |
| 1189 | var op2: u128 = 34; | 1235 | var op2: u128 = 34; |
| 1190 | 1236 | ||
| ... | @@ -1204,6 +1250,8 @@ test "big.int div multi-single with rem" { | ... | @@ -1204,6 +1250,8 @@ test "big.int div multi-single with rem" { |
| 1204 | } | 1250 | } |
| 1205 | 1251 | ||
| 1206 | test "big.int div multi>2-single" { | 1252 | test "big.int div multi>2-single" { |
| 1253 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1254 | |||
| 1207 | var op1: u128 = 0xfefefefefefefefefefefefefefefefe; | 1255 | var op1: u128 = 0xfefefefefefefefefefefefefefefefe; |
| 1208 | var op2: u128 = 0xefab8; | 1256 | var op2: u128 = 0xefab8; |
| 1209 | 1257 | ||
| ... | @@ -1223,6 +1271,8 @@ test "big.int div multi>2-single" { | ... | @@ -1223,6 +1271,8 @@ test "big.int div multi>2-single" { |
| 1223 | } | 1271 | } |
| 1224 | 1272 | ||
| 1225 | test "big.int div single-single q < r" { | 1273 | test "big.int div single-single q < r" { |
| 1274 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1275 | |||
| 1226 | var a = try Managed.initSet(testing.allocator, 0x0078f432); | 1276 | var a = try Managed.initSet(testing.allocator, 0x0078f432); |
| 1227 | defer a.deinit(); | 1277 | defer a.deinit(); |
| 1228 | var b = try Managed.initSet(testing.allocator, 0x01000000); | 1278 | var b = try Managed.initSet(testing.allocator, 0x01000000); |
| ... | @@ -1267,7 +1317,10 @@ test "big.int div q=0 alias" { | ... | @@ -1267,7 +1317,10 @@ test "big.int div q=0 alias" { |
| 1267 | } | 1317 | } |
| 1268 | 1318 | ||
| 1269 | test "big.int div multi-multi q < r" { | 1319 | test "big.int div multi-multi q < r" { |
| 1270 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; | 1320 | switch (builtin.zig_backend) { |
| 1321 | .stage2_c, .stage2_x86_64 => return error.SkipZigTest, | ||
| 1322 | else => {}, | ||
| 1323 | } | ||
| 1271 | 1324 | ||
| 1272 | const op1 = 0x1ffffffff0078f432; | 1325 | const op1 = 0x1ffffffff0078f432; |
| 1273 | const op2 = 0x1ffffffff01000000; | 1326 | const op2 = 0x1ffffffff01000000; |
| ... | @@ -1398,6 +1451,8 @@ test "big.int divTrunc #15535" { | ... | @@ -1398,6 +1451,8 @@ test "big.int divTrunc #15535" { |
| 1398 | } | 1451 | } |
| 1399 | 1452 | ||
| 1400 | test "big.int divFloor #10932" { | 1453 | test "big.int divFloor #10932" { |
| 1454 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1455 | |||
| 1401 | var a = try Managed.init(testing.allocator); | 1456 | var a = try Managed.init(testing.allocator); |
| 1402 | defer a.deinit(); | 1457 | defer a.deinit(); |
| 1403 | 1458 | ||
| ... | @@ -1422,6 +1477,8 @@ test "big.int divFloor #10932" { | ... | @@ -1422,6 +1477,8 @@ test "big.int divFloor #10932" { |
| 1422 | } | 1477 | } |
| 1423 | 1478 | ||
| 1424 | test "big.int divFloor #11166" { | 1479 | test "big.int divFloor #11166" { |
| 1480 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1481 | |||
| 1425 | var a = try Managed.init(testing.allocator); | 1482 | var a = try Managed.init(testing.allocator); |
| 1426 | defer a.deinit(); | 1483 | defer a.deinit(); |
| 1427 | 1484 | ||
| ... | @@ -1585,6 +1642,8 @@ test "big.int div floor single-single -/-" { | ... | @@ -1585,6 +1642,8 @@ test "big.int div floor single-single -/-" { |
| 1585 | } | 1642 | } |
| 1586 | 1643 | ||
| 1587 | test "big.int div floor no remainder negative quotient" { | 1644 | test "big.int div floor no remainder negative quotient" { |
| 1645 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1646 | |||
| 1588 | const u: i32 = -0x80000000; | 1647 | const u: i32 = -0x80000000; |
| 1589 | const v: i32 = 1; | 1648 | const v: i32 = 1; |
| 1590 | 1649 | ||
| ... | @@ -1642,7 +1701,10 @@ test "big.int div floor positive close to zero" { | ... | @@ -1642,7 +1701,10 @@ test "big.int div floor positive close to zero" { |
| 1642 | } | 1701 | } |
| 1643 | 1702 | ||
| 1644 | test "big.int div multi-multi with rem" { | 1703 | test "big.int div multi-multi with rem" { |
| 1645 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; | 1704 | switch (builtin.zig_backend) { |
| 1705 | .stage2_c, .stage2_x86_64 => return error.SkipZigTest, | ||
| 1706 | else => {}, | ||
| 1707 | } | ||
| 1646 | 1708 | ||
| 1647 | var a = try Managed.initSet(testing.allocator, 0x8888999911110000ffffeeeeddddccccbbbbaaaa9999); | 1709 | var a = try Managed.initSet(testing.allocator, 0x8888999911110000ffffeeeeddddccccbbbbaaaa9999); |
| 1648 | defer a.deinit(); | 1710 | defer a.deinit(); |
| ... | @@ -1660,7 +1722,10 @@ test "big.int div multi-multi with rem" { | ... | @@ -1660,7 +1722,10 @@ test "big.int div multi-multi with rem" { |
| 1660 | } | 1722 | } |
| 1661 | 1723 | ||
| 1662 | test "big.int div multi-multi no rem" { | 1724 | test "big.int div multi-multi no rem" { |
| 1663 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; | 1725 | switch (builtin.zig_backend) { |
| 1726 | .stage2_c, .stage2_x86_64 => return error.SkipZigTest, | ||
| 1727 | else => {}, | ||
| 1728 | } | ||
| 1664 | 1729 | ||
| 1665 | var a = try Managed.initSet(testing.allocator, 0x8888999911110000ffffeeeedb4fec200ee3a4286361); | 1730 | var a = try Managed.initSet(testing.allocator, 0x8888999911110000ffffeeeedb4fec200ee3a4286361); |
| 1666 | defer a.deinit(); | 1731 | defer a.deinit(); |
| ... | @@ -1678,7 +1743,10 @@ test "big.int div multi-multi no rem" { | ... | @@ -1678,7 +1743,10 @@ test "big.int div multi-multi no rem" { |
| 1678 | } | 1743 | } |
| 1679 | 1744 | ||
| 1680 | test "big.int div multi-multi (2 branch)" { | 1745 | test "big.int div multi-multi (2 branch)" { |
| 1681 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; | 1746 | switch (builtin.zig_backend) { |
| 1747 | .stage2_c, .stage2_x86_64 => return error.SkipZigTest, | ||
| 1748 | else => {}, | ||
| 1749 | } | ||
| 1682 | 1750 | ||
| 1683 | var a = try Managed.initSet(testing.allocator, 0x866666665555555588888887777777761111111111111111); | 1751 | var a = try Managed.initSet(testing.allocator, 0x866666665555555588888887777777761111111111111111); |
| 1684 | defer a.deinit(); | 1752 | defer a.deinit(); |
| ... | @@ -1717,7 +1785,10 @@ test "big.int div multi-multi (3.1/3.3 branch)" { | ... | @@ -1717,7 +1785,10 @@ test "big.int div multi-multi (3.1/3.3 branch)" { |
| 1717 | } | 1785 | } |
| 1718 | 1786 | ||
| 1719 | test "big.int div multi-single zero-limb trailing" { | 1787 | test "big.int div multi-single zero-limb trailing" { |
| 1720 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; | 1788 | switch (builtin.zig_backend) { |
| 1789 | .stage2_c, .stage2_x86_64 => return error.SkipZigTest, | ||
| 1790 | else => {}, | ||
| 1791 | } | ||
| 1721 | 1792 | ||
| 1722 | var a = try Managed.initSet(testing.allocator, 0x60000000000000000000000000000000000000000000000000000000000000000); | 1793 | var a = try Managed.initSet(testing.allocator, 0x60000000000000000000000000000000000000000000000000000000000000000); |
| 1723 | defer a.deinit(); | 1794 | defer a.deinit(); |
| ... | @@ -1737,7 +1808,10 @@ test "big.int div multi-single zero-limb trailing" { | ... | @@ -1737,7 +1808,10 @@ test "big.int div multi-single zero-limb trailing" { |
| 1737 | } | 1808 | } |
| 1738 | 1809 | ||
| 1739 | test "big.int div multi-multi zero-limb trailing (with rem)" { | 1810 | test "big.int div multi-multi zero-limb trailing (with rem)" { |
| 1740 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; | 1811 | switch (builtin.zig_backend) { |
| 1812 | .stage2_c, .stage2_x86_64 => return error.SkipZigTest, | ||
| 1813 | else => {}, | ||
| 1814 | } | ||
| 1741 | 1815 | ||
| 1742 | var a = try Managed.initSet(testing.allocator, 0x86666666555555558888888777777776111111111111111100000000000000000000000000000000); | 1816 | var a = try Managed.initSet(testing.allocator, 0x86666666555555558888888777777776111111111111111100000000000000000000000000000000); |
| 1743 | defer a.deinit(); | 1817 | defer a.deinit(); |
| ... | @@ -1758,7 +1832,10 @@ test "big.int div multi-multi zero-limb trailing (with rem)" { | ... | @@ -1758,7 +1832,10 @@ test "big.int div multi-multi zero-limb trailing (with rem)" { |
| 1758 | } | 1832 | } |
| 1759 | 1833 | ||
| 1760 | test "big.int div multi-multi zero-limb trailing (with rem) and dividend zero-limb count > divisor zero-limb count" { | 1834 | test "big.int div multi-multi zero-limb trailing (with rem) and dividend zero-limb count > divisor zero-limb count" { |
| 1761 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; | 1835 | switch (builtin.zig_backend) { |
| 1836 | .stage2_c, .stage2_x86_64 => return error.SkipZigTest, | ||
| 1837 | else => {}, | ||
| 1838 | } | ||
| 1762 | 1839 | ||
| 1763 | var a = try Managed.initSet(testing.allocator, 0x8666666655555555888888877777777611111111111111110000000000000000); | 1840 | var a = try Managed.initSet(testing.allocator, 0x8666666655555555888888877777777611111111111111110000000000000000); |
| 1764 | defer a.deinit(); | 1841 | defer a.deinit(); |
| ... | @@ -1779,7 +1856,10 @@ test "big.int div multi-multi zero-limb trailing (with rem) and dividend zero-li | ... | @@ -1779,7 +1856,10 @@ test "big.int div multi-multi zero-limb trailing (with rem) and dividend zero-li |
| 1779 | } | 1856 | } |
| 1780 | 1857 | ||
| 1781 | test "big.int div multi-multi zero-limb trailing (with rem) and dividend zero-limb count < divisor zero-limb count" { | 1858 | test "big.int div multi-multi zero-limb trailing (with rem) and dividend zero-limb count < divisor zero-limb count" { |
| 1782 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; | 1859 | switch (builtin.zig_backend) { |
| 1860 | .stage2_c, .stage2_x86_64 => return error.SkipZigTest, | ||
| 1861 | else => {}, | ||
| 1862 | } | ||
| 1783 | 1863 | ||
| 1784 | var a = try Managed.initSet(testing.allocator, 0x86666666555555558888888777777776111111111111111100000000000000000000000000000000); | 1864 | var a = try Managed.initSet(testing.allocator, 0x86666666555555558888888777777776111111111111111100000000000000000000000000000000); |
| 1785 | defer a.deinit(); | 1865 | defer a.deinit(); |
| ... | @@ -1802,6 +1882,8 @@ test "big.int div multi-multi zero-limb trailing (with rem) and dividend zero-li | ... | @@ -1802,6 +1882,8 @@ test "big.int div multi-multi zero-limb trailing (with rem) and dividend zero-li |
| 1802 | } | 1882 | } |
| 1803 | 1883 | ||
| 1804 | test "big.int div multi-multi fuzz case #1" { | 1884 | test "big.int div multi-multi fuzz case #1" { |
| 1885 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1886 | |||
| 1805 | var a = try Managed.init(testing.allocator); | 1887 | var a = try Managed.init(testing.allocator); |
| 1806 | defer a.deinit(); | 1888 | defer a.deinit(); |
| 1807 | var b = try Managed.init(testing.allocator); | 1889 | var b = try Managed.init(testing.allocator); |
| ... | @@ -1826,6 +1908,8 @@ test "big.int div multi-multi fuzz case #1" { | ... | @@ -1826,6 +1908,8 @@ test "big.int div multi-multi fuzz case #1" { |
| 1826 | } | 1908 | } |
| 1827 | 1909 | ||
| 1828 | test "big.int div multi-multi fuzz case #2" { | 1910 | test "big.int div multi-multi fuzz case #2" { |
| 1911 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1912 | |||
| 1829 | var a = try Managed.init(testing.allocator); | 1913 | var a = try Managed.init(testing.allocator); |
| 1830 | defer a.deinit(); | 1914 | defer a.deinit(); |
| 1831 | var b = try Managed.init(testing.allocator); | 1915 | var b = try Managed.init(testing.allocator); |
| ... | @@ -1898,6 +1982,8 @@ test "big.int truncate multi to multi unsigned" { | ... | @@ -1898,6 +1982,8 @@ test "big.int truncate multi to multi unsigned" { |
| 1898 | } | 1982 | } |
| 1899 | 1983 | ||
| 1900 | test "big.int truncate multi to multi signed" { | 1984 | test "big.int truncate multi to multi signed" { |
| 1985 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1986 | |||
| 1901 | var a = try Managed.initSet(testing.allocator, 3 << @bitSizeOf(Limb)); | 1987 | var a = try Managed.initSet(testing.allocator, 3 << @bitSizeOf(Limb)); |
| 1902 | defer a.deinit(); | 1988 | defer a.deinit(); |
| 1903 | 1989 | ||
| ... | @@ -1907,6 +1993,8 @@ test "big.int truncate multi to multi signed" { | ... | @@ -1907,6 +1993,8 @@ test "big.int truncate multi to multi signed" { |
| 1907 | } | 1993 | } |
| 1908 | 1994 | ||
| 1909 | test "big.int truncate negative multi to single" { | 1995 | test "big.int truncate negative multi to single" { |
| 1996 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1997 | |||
| 1910 | var a = try Managed.initSet(testing.allocator, -@as(SignedDoubleLimb, maxInt(Limb) + 1)); | 1998 | var a = try Managed.initSet(testing.allocator, -@as(SignedDoubleLimb, maxInt(Limb) + 1)); |
| 1911 | defer a.deinit(); | 1999 | defer a.deinit(); |
| 1912 | 2000 | ||
| ... | @@ -2013,6 +2101,8 @@ test "big.int shift-right multi" { | ... | @@ -2013,6 +2101,8 @@ test "big.int shift-right multi" { |
| 2013 | } | 2101 | } |
| 2014 | 2102 | ||
| 2015 | test "big.int shift-left single" { | 2103 | test "big.int shift-left single" { |
| 2104 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 2105 | |||
| 2016 | var a = try Managed.initSet(testing.allocator, 0xffff); | 2106 | var a = try Managed.initSet(testing.allocator, 0xffff); |
| 2017 | defer a.deinit(); | 2107 | defer a.deinit(); |
| 2018 | try a.shiftLeft(&a, 16); | 2108 | try a.shiftLeft(&a, 16); |
| ... | @@ -2057,6 +2147,8 @@ test "big.int sat shift-left simple unsigned" { | ... | @@ -2057,6 +2147,8 @@ test "big.int sat shift-left simple unsigned" { |
| 2057 | } | 2147 | } |
| 2058 | 2148 | ||
| 2059 | test "big.int sat shift-left simple unsigned no sat" { | 2149 | test "big.int sat shift-left simple unsigned no sat" { |
| 2150 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 2151 | |||
| 2060 | var a = try Managed.initSet(testing.allocator, 1); | 2152 | var a = try Managed.initSet(testing.allocator, 1); |
| 2061 | defer a.deinit(); | 2153 | defer a.deinit(); |
| 2062 | try a.shiftLeftSat(&a, 16, .unsigned, 21); | 2154 | try a.shiftLeftSat(&a, 16, .unsigned, 21); |
| ... | @@ -2314,6 +2406,8 @@ test "big.int bitwise xor simple" { | ... | @@ -2314,6 +2406,8 @@ test "big.int bitwise xor simple" { |
| 2314 | } | 2406 | } |
| 2315 | 2407 | ||
| 2316 | test "big.int bitwise xor multi-limb" { | 2408 | test "big.int bitwise xor multi-limb" { |
| 2409 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 2410 | |||
| 2317 | var x: DoubleLimb = maxInt(Limb) + 1; | 2411 | var x: DoubleLimb = maxInt(Limb) + 1; |
| 2318 | var y: DoubleLimb = maxInt(Limb); | 2412 | var y: DoubleLimb = maxInt(Limb); |
| 2319 | var a = try Managed.initSet(testing.allocator, x); | 2413 | var a = try Managed.initSet(testing.allocator, x); |
| ... | @@ -2578,6 +2672,8 @@ test "big.int mutable to managed" { | ... | @@ -2578,6 +2672,8 @@ test "big.int mutable to managed" { |
| 2578 | } | 2672 | } |
| 2579 | 2673 | ||
| 2580 | test "big.int const to managed" { | 2674 | test "big.int const to managed" { |
| 2675 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 2676 | |||
| 2581 | var a = try Managed.initSet(testing.allocator, 123423453456); | 2677 | var a = try Managed.initSet(testing.allocator, 123423453456); |
| 2582 | defer a.deinit(); | 2678 | defer a.deinit(); |
| 2583 | 2679 | ||
| ... | @@ -2588,6 +2684,8 @@ test "big.int const to managed" { | ... | @@ -2588,6 +2684,8 @@ test "big.int const to managed" { |
| 2588 | } | 2684 | } |
| 2589 | 2685 | ||
| 2590 | test "big.int pow" { | 2686 | test "big.int pow" { |
| 2687 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 2688 | |||
| 2591 | { | 2689 | { |
| 2592 | var a = try Managed.initSet(testing.allocator, -3); | 2690 | var a = try Managed.initSet(testing.allocator, -3); |
| 2593 | defer a.deinit(); | 2691 | defer a.deinit(); |
| ... | @@ -2643,6 +2741,8 @@ test "big.int pow" { | ... | @@ -2643,6 +2741,8 @@ test "big.int pow" { |
| 2643 | } | 2741 | } |
| 2644 | 2742 | ||
| 2645 | test "big.int sqrt" { | 2743 | test "big.int sqrt" { |
| 2744 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 2745 | |||
| 2646 | var r = try Managed.init(testing.allocator); | 2746 | var r = try Managed.init(testing.allocator); |
| 2647 | defer r.deinit(); | 2747 | defer r.deinit(); |
| 2648 | var a = try Managed.init(testing.allocator); | 2748 | var a = try Managed.init(testing.allocator); |
| ... | @@ -2673,6 +2773,8 @@ test "big.int sqrt" { | ... | @@ -2673,6 +2773,8 @@ test "big.int sqrt" { |
| 2673 | } | 2773 | } |
| 2674 | 2774 | ||
| 2675 | test "big.int regression test for 1 limb overflow with alias" { | 2775 | test "big.int regression test for 1 limb overflow with alias" { |
| 2776 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 2777 | |||
| 2676 | // Note these happen to be two consecutive Fibonacci sequence numbers, the | 2778 | // Note these happen to be two consecutive Fibonacci sequence numbers, the |
| 2677 | // first two whose sum exceeds 2**64. | 2779 | // first two whose sum exceeds 2**64. |
| 2678 | var a = try Managed.initSet(testing.allocator, 7540113804746346429); | 2780 | var a = try Managed.initSet(testing.allocator, 7540113804746346429); |
| ... | @@ -2687,6 +2789,8 @@ test "big.int regression test for 1 limb overflow with alias" { | ... | @@ -2687,6 +2789,8 @@ test "big.int regression test for 1 limb overflow with alias" { |
| 2687 | } | 2789 | } |
| 2688 | 2790 | ||
| 2689 | test "big.int regression test for realloc with alias" { | 2791 | test "big.int regression test for realloc with alias" { |
| 2792 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 2793 | |||
| 2690 | // Note these happen to be two consecutive Fibonacci sequence numbers, the | 2794 | // Note these happen to be two consecutive Fibonacci sequence numbers, the |
| 2691 | // second of which is the first such number to exceed 2**192. | 2795 | // second of which is the first such number to exceed 2**192. |
| 2692 | var a = try Managed.initSet(testing.allocator, 5611500259351924431073312796924978741056961814867751431689); | 2796 | var a = try Managed.initSet(testing.allocator, 5611500259351924431073312796924978741056961814867751431689); |
| ... | @@ -2701,6 +2805,8 @@ test "big.int regression test for realloc with alias" { | ... | @@ -2701,6 +2805,8 @@ test "big.int regression test for realloc with alias" { |
| 2701 | } | 2805 | } |
| 2702 | 2806 | ||
| 2703 | test "big int popcount" { | 2807 | test "big int popcount" { |
| 2808 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 2809 | |||
| 2704 | var a = try Managed.init(testing.allocator); | 2810 | var a = try Managed.init(testing.allocator); |
| 2705 | defer a.deinit(); | 2811 | defer a.deinit(); |
| 2706 | 2812 | ||
| ... | @@ -2781,6 +2887,8 @@ fn popCountTest(val: *const Managed, bit_count: usize, expected: usize) !void { | ... | @@ -2781,6 +2887,8 @@ fn popCountTest(val: *const Managed, bit_count: usize, expected: usize) !void { |
| 2781 | } | 2887 | } |
| 2782 | 2888 | ||
| 2783 | test "big int conversion read/write twos complement" { | 2889 | test "big int conversion read/write twos complement" { |
| 2890 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 2891 | |||
| 2784 | var a = try Managed.initSet(testing.allocator, (1 << 493) - 1); | 2892 | var a = try Managed.initSet(testing.allocator, (1 << 493) - 1); |
| 2785 | defer a.deinit(); | 2893 | defer a.deinit(); |
| 2786 | var b = try Managed.initSet(testing.allocator, (1 << 493) - 1); | 2894 | var b = try Managed.initSet(testing.allocator, (1 << 493) - 1); |
| ... | @@ -2879,6 +2987,8 @@ test "big int write twos complement +/- zero" { | ... | @@ -2879,6 +2987,8 @@ test "big int write twos complement +/- zero" { |
| 2879 | } | 2987 | } |
| 2880 | 2988 | ||
| 2881 | test "big int conversion write twos complement with padding" { | 2989 | test "big int conversion write twos complement with padding" { |
| 2990 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 2991 | |||
| 2882 | var a = try Managed.initSet(testing.allocator, 0x01_ffffffff_ffffffff_ffffffff); | 2992 | var a = try Managed.initSet(testing.allocator, 0x01_ffffffff_ffffffff_ffffffff); |
| 2883 | defer a.deinit(); | 2993 | defer a.deinit(); |
| 2884 | 2994 | ||
| ... | @@ -3108,6 +3218,8 @@ test "big int byte swap" { | ... | @@ -3108,6 +3218,8 @@ test "big int byte swap" { |
| 3108 | } | 3218 | } |
| 3109 | 3219 | ||
| 3110 | test "big.int mul multi-multi alias r with a and b" { | 3220 | test "big.int mul multi-multi alias r with a and b" { |
| 3221 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 3222 | |||
| 3111 | var a = try Managed.initSet(testing.allocator, 2 * maxInt(Limb)); | 3223 | var a = try Managed.initSet(testing.allocator, 2 * maxInt(Limb)); |
| 3112 | defer a.deinit(); | 3224 | defer a.deinit(); |
| 3113 | 3225 | ||
| ... | @@ -3124,6 +3236,8 @@ test "big.int mul multi-multi alias r with a and b" { | ... | @@ -3124,6 +3236,8 @@ test "big.int mul multi-multi alias r with a and b" { |
| 3124 | } | 3236 | } |
| 3125 | 3237 | ||
| 3126 | test "big.int sqr multi alias r with a" { | 3238 | test "big.int sqr multi alias r with a" { |
| 3239 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 3240 | |||
| 3127 | var a = try Managed.initSet(testing.allocator, 2 * maxInt(Limb)); | 3241 | var a = try Managed.initSet(testing.allocator, 2 * maxInt(Limb)); |
| 3128 | defer a.deinit(); | 3242 | defer a.deinit(); |
| 3129 | 3243 |
lib/std/math/ilogb.zig+9| ... | @@ -6,6 +6,7 @@ | ... | @@ -6,6 +6,7 @@ |
| 6 | // https://git.musl-libc.org/cgit/musl/tree/src/math/ilogb.c | 6 | // https://git.musl-libc.org/cgit/musl/tree/src/math/ilogb.c |
| 7 | 7 | ||
| 8 | const std = @import("../std.zig"); | 8 | const std = @import("../std.zig"); |
| 9 | const builtin = @import("builtin"); | ||
| 9 | const math = std.math; | 10 | const math = std.math; |
| 10 | const expect = std.testing.expect; | 11 | const expect = std.testing.expect; |
| 11 | const maxInt = std.math.maxInt; | 12 | const maxInt = std.math.maxInt; |
| ... | @@ -108,6 +109,8 @@ test "64" { | ... | @@ -108,6 +109,8 @@ test "64" { |
| 108 | } | 109 | } |
| 109 | 110 | ||
| 110 | test "80" { | 111 | test "80" { |
| 112 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 113 | |||
| 111 | try expect(ilogbX(f80, 0.0) == fp_ilogb0); | 114 | try expect(ilogbX(f80, 0.0) == fp_ilogb0); |
| 112 | try expect(ilogbX(f80, 0.5) == -1); | 115 | try expect(ilogbX(f80, 0.5) == -1); |
| 113 | try expect(ilogbX(f80, 0.8923) == -1); | 116 | try expect(ilogbX(f80, 0.8923) == -1); |
| ... | @@ -122,6 +125,8 @@ test "80" { | ... | @@ -122,6 +125,8 @@ test "80" { |
| 122 | } | 125 | } |
| 123 | 126 | ||
| 124 | test "128" { | 127 | test "128" { |
| 128 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 129 | |||
| 125 | try expect(ilogbX(f128, 0.0) == fp_ilogb0); | 130 | try expect(ilogbX(f128, 0.0) == fp_ilogb0); |
| 126 | try expect(ilogbX(f128, 0.5) == -1); | 131 | try expect(ilogbX(f128, 0.5) == -1); |
| 127 | try expect(ilogbX(f128, 0.8923) == -1); | 132 | try expect(ilogbX(f128, 0.8923) == -1); |
| ... | @@ -157,6 +162,8 @@ test "64 special" { | ... | @@ -157,6 +162,8 @@ test "64 special" { |
| 157 | } | 162 | } |
| 158 | 163 | ||
| 159 | test "80 special" { | 164 | test "80 special" { |
| 165 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 166 | |||
| 160 | try expect(ilogbX(f80, math.inf(f80)) == maxInt(i32)); | 167 | try expect(ilogbX(f80, math.inf(f80)) == maxInt(i32)); |
| 161 | try expect(ilogbX(f80, -math.inf(f80)) == maxInt(i32)); | 168 | try expect(ilogbX(f80, -math.inf(f80)) == maxInt(i32)); |
| 162 | try expect(ilogbX(f80, 0.0) == minInt(i32)); | 169 | try expect(ilogbX(f80, 0.0) == minInt(i32)); |
| ... | @@ -164,6 +171,8 @@ test "80 special" { | ... | @@ -164,6 +171,8 @@ test "80 special" { |
| 164 | } | 171 | } |
| 165 | 172 | ||
| 166 | test "128 special" { | 173 | test "128 special" { |
| 174 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 175 | |||
| 167 | try expect(ilogbX(f128, math.inf(f128)) == maxInt(i32)); | 176 | try expect(ilogbX(f128, math.inf(f128)) == maxInt(i32)); |
| 168 | try expect(ilogbX(f128, -math.inf(f128)) == maxInt(i32)); | 177 | try expect(ilogbX(f128, -math.inf(f128)) == maxInt(i32)); |
| 169 | try expect(ilogbX(f128, 0.0) == minInt(i32)); | 178 | try expect(ilogbX(f128, 0.0) == minInt(i32)); |
lib/std/math/ldexp.zig+1| ... | @@ -67,6 +67,7 @@ pub fn ldexp(x: anytype, n: i32) @TypeOf(x) { | ... | @@ -67,6 +67,7 @@ pub fn ldexp(x: anytype, n: i32) @TypeOf(x) { |
| 67 | } | 67 | } |
| 68 | 68 | ||
| 69 | test "math.ldexp" { | 69 | test "math.ldexp" { |
| 70 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 70 | 71 | ||
| 71 | // subnormals | 72 | // subnormals |
| 72 | try expect(ldexp(@as(f16, 0x1.1FFp14), -14 - 9 - 15) == math.floatTrueMin(f16)); | 73 | try expect(ldexp(@as(f16, 0x1.1FFp14), -14 - 9 - 15) == math.floatTrueMin(f16)); |
lib/std/math/log_int.zig+2| ... | @@ -56,6 +56,8 @@ pub fn log_int(comptime T: type, base: T, x: T) Log2Int(T) { | ... | @@ -56,6 +56,8 @@ pub fn log_int(comptime T: type, base: T, x: T) Log2Int(T) { |
| 56 | } | 56 | } |
| 57 | 57 | ||
| 58 | test "math.log_int" { | 58 | test "math.log_int" { |
| 59 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 60 | |||
| 59 | // Test all unsigned integers with 2, 3, ..., 64 bits. | 61 | // Test all unsigned integers with 2, 3, ..., 64 bits. |
| 60 | // We cannot test 0 or 1 bits since base must be > 1. | 62 | // We cannot test 0 or 1 bits since base must be > 1. |
| 61 | inline for (2..64 + 1) |bits| { | 63 | inline for (2..64 + 1) |bits| { |
lib/std/math/scalbn.zig+2| ... | @@ -7,6 +7,8 @@ const expect = std.testing.expect; | ... | @@ -7,6 +7,8 @@ const expect = std.testing.expect; |
| 7 | pub const scalbn = @import("ldexp.zig").ldexp; | 7 | pub const scalbn = @import("ldexp.zig").ldexp; |
| 8 | 8 | ||
| 9 | test "math.scalbn" { | 9 | test "math.scalbn" { |
| 10 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 11 | |||
| 10 | // Verify we are using base 2. | 12 | // Verify we are using base 2. |
| 11 | try expect(scalbn(@as(f16, 1.5), 4) == 24.0); | 13 | try expect(scalbn(@as(f16, 1.5), 4) == 24.0); |
| 12 | try expect(scalbn(@as(f32, 1.5), 4) == 24.0); | 14 | try expect(scalbn(@as(f32, 1.5), 4) == 24.0); |
lib/std/mem.zig+2| ... | @@ -1025,6 +1025,8 @@ pub fn indexOfSentinel(comptime T: type, comptime sentinel: T, p: [*:sentinel]co | ... | @@ -1025,6 +1025,8 @@ pub fn indexOfSentinel(comptime T: type, comptime sentinel: T, p: [*:sentinel]co |
| 1025 | } | 1025 | } |
| 1026 | 1026 | ||
| 1027 | test "indexOfSentinel vector paths" { | 1027 | test "indexOfSentinel vector paths" { |
| 1028 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1029 | |||
| 1028 | const Types = [_]type{ u8, u16, u32, u64 }; | 1030 | const Types = [_]type{ u8, u16, u32, u64 }; |
| 1029 | const allocator = std.testing.allocator; | 1031 | const allocator = std.testing.allocator; |
| 1030 | 1032 |
lib/std/net/test.zig+2| ... | @@ -5,6 +5,7 @@ const mem = std.mem; | ... | @@ -5,6 +5,7 @@ const mem = std.mem; |
| 5 | const testing = std.testing; | 5 | const testing = std.testing; |
| 6 | 6 | ||
| 7 | test "parse and render IPv6 addresses" { | 7 | test "parse and render IPv6 addresses" { |
| 8 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 8 | if (builtin.os.tag == .wasi) return error.SkipZigTest; | 9 | if (builtin.os.tag == .wasi) return error.SkipZigTest; |
| 9 | 10 | ||
| 10 | var buffer: [100]u8 = undefined; | 11 | var buffer: [100]u8 = undefined; |
| ... | @@ -70,6 +71,7 @@ test "invalid but parseable IPv6 scope ids" { | ... | @@ -70,6 +71,7 @@ test "invalid but parseable IPv6 scope ids" { |
| 70 | } | 71 | } |
| 71 | 72 | ||
| 72 | test "parse and render IPv4 addresses" { | 73 | test "parse and render IPv4 addresses" { |
| 74 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 73 | if (builtin.os.tag == .wasi) return error.SkipZigTest; | 75 | if (builtin.os.tag == .wasi) return error.SkipZigTest; |
| 74 | 76 | ||
| 75 | var buffer: [18]u8 = undefined; | 77 | var buffer: [18]u8 = undefined; |
lib/std/once.zig+2| ... | @@ -46,6 +46,8 @@ fn incr() void { | ... | @@ -46,6 +46,8 @@ fn incr() void { |
| 46 | } | 46 | } |
| 47 | 47 | ||
| 48 | test "Once executes its function just once" { | 48 | test "Once executes its function just once" { |
| 49 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 50 | |||
| 49 | if (builtin.single_threaded) { | 51 | if (builtin.single_threaded) { |
| 50 | global_once.call(); | 52 | global_once.call(); |
| 51 | global_once.call(); | 53 | global_once.call(); |
lib/std/os/linux/io_uring.zig+4| ... | @@ -1862,6 +1862,8 @@ test "write/read" { | ... | @@ -1862,6 +1862,8 @@ test "write/read" { |
| 1862 | test "splice/read" { | 1862 | test "splice/read" { |
| 1863 | if (builtin.os.tag != .linux) return error.SkipZigTest; | 1863 | if (builtin.os.tag != .linux) return error.SkipZigTest; |
| 1864 | 1864 | ||
| 1865 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1866 | |||
| 1865 | var ring = IO_Uring.init(4, 0) catch |err| switch (err) { | 1867 | var ring = IO_Uring.init(4, 0) catch |err| switch (err) { |
| 1866 | error.SystemOutdated => return error.SkipZigTest, | 1868 | error.SystemOutdated => return error.SkipZigTest, |
| 1867 | error.PermissionDenied => return error.SkipZigTest, | 1869 | error.PermissionDenied => return error.SkipZigTest, |
| ... | @@ -2280,6 +2282,8 @@ test "timeout (after a number of completions)" { | ... | @@ -2280,6 +2282,8 @@ test "timeout (after a number of completions)" { |
| 2280 | test "timeout_remove" { | 2282 | test "timeout_remove" { |
| 2281 | if (builtin.os.tag != .linux) return error.SkipZigTest; | 2283 | if (builtin.os.tag != .linux) return error.SkipZigTest; |
| 2282 | 2284 | ||
| 2285 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 2286 | |||
| 2283 | var ring = IO_Uring.init(2, 0) catch |err| switch (err) { | 2287 | var ring = IO_Uring.init(2, 0) catch |err| switch (err) { |
| 2284 | error.SystemOutdated => return error.SkipZigTest, | 2288 | error.SystemOutdated => return error.SkipZigTest, |
| 2285 | error.PermissionDenied => return error.SkipZigTest, | 2289 | error.PermissionDenied => return error.SkipZigTest, |
lib/std/os/test.zig+11| ... | @@ -385,6 +385,8 @@ fn testThreadIdFn(thread_id: *Thread.Id) void { | ... | @@ -385,6 +385,8 @@ fn testThreadIdFn(thread_id: *Thread.Id) void { |
| 385 | test "std.Thread.getCurrentId" { | 385 | test "std.Thread.getCurrentId" { |
| 386 | if (builtin.single_threaded) return error.SkipZigTest; | 386 | if (builtin.single_threaded) return error.SkipZigTest; |
| 387 | 387 | ||
| 388 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 389 | |||
| 388 | var thread_current_id: Thread.Id = undefined; | 390 | var thread_current_id: Thread.Id = undefined; |
| 389 | const thread = try Thread.spawn(.{}, testThreadIdFn, .{&thread_current_id}); | 391 | const thread = try Thread.spawn(.{}, testThreadIdFn, .{&thread_current_id}); |
| 390 | thread.join(); | 392 | thread.join(); |
| ... | @@ -427,6 +429,9 @@ test "cpu count" { | ... | @@ -427,6 +429,9 @@ test "cpu count" { |
| 427 | 429 | ||
| 428 | test "thread local storage" { | 430 | test "thread local storage" { |
| 429 | if (builtin.single_threaded) return error.SkipZigTest; | 431 | if (builtin.single_threaded) return error.SkipZigTest; |
| 432 | |||
| 433 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 434 | |||
| 430 | const thread1 = try Thread.spawn(.{}, testTls, .{}); | 435 | const thread1 = try Thread.spawn(.{}, testTls, .{}); |
| 431 | const thread2 = try Thread.spawn(.{}, testTls, .{}); | 436 | const thread2 = try Thread.spawn(.{}, testTls, .{}); |
| 432 | try testTls(); | 437 | try testTls(); |
| ... | @@ -514,6 +519,8 @@ fn iter_fn(info: *dl_phdr_info, size: usize, counter: *usize) IterFnError!void { | ... | @@ -514,6 +519,8 @@ fn iter_fn(info: *dl_phdr_info, size: usize, counter: *usize) IterFnError!void { |
| 514 | test "dl_iterate_phdr" { | 519 | test "dl_iterate_phdr" { |
| 515 | if (builtin.object_format != .elf) return error.SkipZigTest; | 520 | if (builtin.object_format != .elf) return error.SkipZigTest; |
| 516 | 521 | ||
| 522 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 523 | |||
| 517 | var counter: usize = 0; | 524 | var counter: usize = 0; |
| 518 | try os.dl_iterate_phdr(&counter, IterFnError, iter_fn); | 525 | try os.dl_iterate_phdr(&counter, IterFnError, iter_fn); |
| 519 | try expect(counter != 0); | 526 | try expect(counter != 0); |
| ... | @@ -773,6 +780,8 @@ test "getrlimit and setrlimit" { | ... | @@ -773,6 +780,8 @@ test "getrlimit and setrlimit" { |
| 773 | return error.SkipZigTest; | 780 | return error.SkipZigTest; |
| 774 | } | 781 | } |
| 775 | 782 | ||
| 783 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 784 | |||
| 776 | inline for (std.meta.fields(os.rlimit_resource)) |field| { | 785 | inline for (std.meta.fields(os.rlimit_resource)) |field| { |
| 777 | const resource = @as(os.rlimit_resource, @enumFromInt(field.value)); | 786 | const resource = @as(os.rlimit_resource, @enumFromInt(field.value)); |
| 778 | const limit = try os.getrlimit(resource); | 787 | const limit = try os.getrlimit(resource); |
| ... | @@ -815,6 +824,8 @@ test "sigaction" { | ... | @@ -815,6 +824,8 @@ test "sigaction" { |
| 815 | if (native_os == .wasi or native_os == .windows) | 824 | if (native_os == .wasi or native_os == .windows) |
| 816 | return error.SkipZigTest; | 825 | return error.SkipZigTest; |
| 817 | 826 | ||
| 827 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 828 | |||
| 818 | // https://github.com/ziglang/zig/issues/7427 | 829 | // https://github.com/ziglang/zig/issues/7427 |
| 819 | if (native_os == .linux and builtin.target.cpu.arch == .x86) | 830 | if (native_os == .linux and builtin.target.cpu.arch == .x86) |
| 820 | return error.SkipZigTest; | 831 | return error.SkipZigTest; |
lib/std/os/windows.zig+2| ... | @@ -2491,6 +2491,8 @@ pub fn ntToWin32Namespace(path: []const u16) !PathSpace { | ... | @@ -2491,6 +2491,8 @@ pub fn ntToWin32Namespace(path: []const u16) !PathSpace { |
| 2491 | } | 2491 | } |
| 2492 | 2492 | ||
| 2493 | test "ntToWin32Namespace" { | 2493 | test "ntToWin32Namespace" { |
| 2494 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 2495 | |||
| 2494 | const L = std.unicode.utf8ToUtf16LeStringLiteral; | 2496 | const L = std.unicode.utf8ToUtf16LeStringLiteral; |
| 2495 | 2497 | ||
| 2496 | try testNtToWin32Namespace(L("UNC"), L("\\??\\UNC")); | 2498 | try testNtToWin32Namespace(L("UNC"), L("\\??\\UNC")); |
lib/std/priority_dequeue.zig+2| ... | @@ -705,6 +705,8 @@ test "std.PriorityDequeue: fromOwnedSlice trivial case 1" { | ... | @@ -705,6 +705,8 @@ test "std.PriorityDequeue: fromOwnedSlice trivial case 1" { |
| 705 | } | 705 | } |
| 706 | 706 | ||
| 707 | test "std.PriorityDequeue: fromOwnedSlice" { | 707 | test "std.PriorityDequeue: fromOwnedSlice" { |
| 708 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 709 | |||
| 708 | const items = [_]u32{ 15, 7, 21, 14, 13, 22, 12, 6, 7, 25, 5, 24, 11, 16, 15, 24, 2, 1 }; | 710 | const items = [_]u32{ 15, 7, 21, 14, 13, 22, 12, 6, 7, 25, 5, 24, 11, 16, 15, 24, 2, 1 }; |
| 709 | const queue_items = try testing.allocator.dupe(u32, items[0..]); | 711 | const queue_items = try testing.allocator.dupe(u32, items[0..]); |
| 710 | var queue = PDQ.fromOwnedSlice(testing.allocator, queue_items[0..], {}); | 712 | var queue = PDQ.fromOwnedSlice(testing.allocator, queue_items[0..], {}); |
lib/std/priority_queue.zig+2| ... | @@ -385,6 +385,8 @@ test "std.PriorityQueue: fromOwnedSlice trivial case 1" { | ... | @@ -385,6 +385,8 @@ test "std.PriorityQueue: fromOwnedSlice trivial case 1" { |
| 385 | } | 385 | } |
| 386 | 386 | ||
| 387 | test "std.PriorityQueue: fromOwnedSlice" { | 387 | test "std.PriorityQueue: fromOwnedSlice" { |
| 388 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 389 | |||
| 388 | const items = [_]u32{ 15, 7, 21, 14, 13, 22, 12, 6, 7, 25, 5, 24, 11, 16, 15, 24, 2, 1 }; | 390 | const items = [_]u32{ 15, 7, 21, 14, 13, 22, 12, 6, 7, 25, 5, 24, 11, 16, 15, 24, 2, 1 }; |
| 389 | const heap_items = try testing.allocator.dupe(u32, items[0..]); | 391 | const heap_items = try testing.allocator.dupe(u32, items[0..]); |
| 390 | var queue = PQlt.fromOwnedSlice(testing.allocator, heap_items[0..], {}); | 392 | var queue = PQlt.fromOwnedSlice(testing.allocator, heap_items[0..], {}); |
lib/std/rand/test.zig+10-1| ... | @@ -1,4 +1,5 @@ | ... | @@ -1,4 +1,5 @@ |
| 1 | const std = @import("../std.zig"); | 1 | const std = @import("../std.zig"); |
| 2 | const builtin = @import("builtin"); | ||
| 2 | const math = std.math; | 3 | const math = std.math; |
| 3 | const DefaultPrng = std.rand.DefaultPrng; | 4 | const DefaultPrng = std.rand.DefaultPrng; |
| 4 | const Random = std.rand.Random; | 5 | const Random = std.rand.Random; |
| ... | @@ -157,6 +158,8 @@ fn testRandomEnumValue() !void { | ... | @@ -157,6 +158,8 @@ fn testRandomEnumValue() !void { |
| 157 | } | 158 | } |
| 158 | 159 | ||
| 159 | test "Random intLessThan" { | 160 | test "Random intLessThan" { |
| 161 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 162 | |||
| 160 | @setEvalBranchQuota(10000); | 163 | @setEvalBranchQuota(10000); |
| 161 | try testRandomIntLessThan(); | 164 | try testRandomIntLessThan(); |
| 162 | try comptime testRandomIntLessThan(); | 165 | try comptime testRandomIntLessThan(); |
| ... | @@ -199,6 +202,8 @@ fn testRandomIntLessThan() !void { | ... | @@ -199,6 +202,8 @@ fn testRandomIntLessThan() !void { |
| 199 | } | 202 | } |
| 200 | 203 | ||
| 201 | test "Random intAtMost" { | 204 | test "Random intAtMost" { |
| 205 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 206 | |||
| 202 | @setEvalBranchQuota(10000); | 207 | @setEvalBranchQuota(10000); |
| 203 | try testRandomIntAtMost(); | 208 | try testRandomIntAtMost(); |
| 204 | try comptime testRandomIntAtMost(); | 209 | try comptime testRandomIntAtMost(); |
| ... | @@ -239,6 +244,8 @@ fn testRandomIntAtMost() !void { | ... | @@ -239,6 +244,8 @@ fn testRandomIntAtMost() !void { |
| 239 | } | 244 | } |
| 240 | 245 | ||
| 241 | test "Random Biased" { | 246 | test "Random Biased" { |
| 247 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 248 | |||
| 242 | var prng = DefaultPrng.init(0); | 249 | var prng = DefaultPrng.init(0); |
| 243 | const random = prng.random(); | 250 | const random = prng.random(); |
| 244 | // Not thoroughly checking the logic here. | 251 | // Not thoroughly checking the logic here. |
| ... | @@ -436,7 +443,7 @@ fn testRangeBias(r: Random, start: i8, end: i8, biased: bool) !void { | ... | @@ -436,7 +443,7 @@ fn testRangeBias(r: Random, start: i8, end: i8, biased: bool) !void { |
| 436 | } | 443 | } |
| 437 | 444 | ||
| 438 | test "CSPRNG" { | 445 | test "CSPRNG" { |
| 439 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | 446 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| 440 | 447 | ||
| 441 | var secret_seed: [DefaultCsprng.secret_seed_length]u8 = undefined; | 448 | var secret_seed: [DefaultCsprng.secret_seed_length]u8 = undefined; |
| 442 | std.crypto.random.bytes(&secret_seed); | 449 | std.crypto.random.bytes(&secret_seed); |
| ... | @@ -449,6 +456,8 @@ test "CSPRNG" { | ... | @@ -449,6 +456,8 @@ test "CSPRNG" { |
| 449 | } | 456 | } |
| 450 | 457 | ||
| 451 | test "Random weightedIndex" { | 458 | test "Random weightedIndex" { |
| 459 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 460 | |||
| 452 | // Make sure weightedIndex works for various integers and floats | 461 | // Make sure weightedIndex works for various integers and floats |
| 453 | inline for (.{ u64, i4, f32, f64 }) |T| { | 462 | inline for (.{ u64, i4, f32, f64 }) |T| { |
| 454 | var prng = DefaultPrng.init(0); | 463 | var prng = DefaultPrng.init(0); |
lib/std/segmented_list.zig+2| ... | @@ -409,6 +409,8 @@ pub fn SegmentedList(comptime T: type, comptime prealloc_item_count: usize) type | ... | @@ -409,6 +409,8 @@ pub fn SegmentedList(comptime T: type, comptime prealloc_item_count: usize) type |
| 409 | } | 409 | } |
| 410 | 410 | ||
| 411 | test "SegmentedList basic usage" { | 411 | test "SegmentedList basic usage" { |
| 412 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 413 | |||
| 412 | try testSegmentedList(0); | 414 | try testSegmentedList(0); |
| 413 | try testSegmentedList(1); | 415 | try testSegmentedList(1); |
| 414 | try testSegmentedList(2); | 416 | try testSegmentedList(2); |
lib/std/sort.zig+11| ... | @@ -1,5 +1,6 @@ | ... | @@ -1,5 +1,6 @@ |
| 1 | const std = @import("std.zig"); | 1 | const std = @import("std.zig"); |
| 2 | const assert = std.debug.assert; | 2 | const assert = std.debug.assert; |
| 3 | const builtin = @import("builtin"); | ||
| 3 | const testing = std.testing; | 4 | const testing = std.testing; |
| 4 | const mem = std.mem; | 5 | const mem = std.mem; |
| 5 | const math = std.math; | 6 | const math = std.math; |
| ... | @@ -176,6 +177,8 @@ const IdAndValue = struct { | ... | @@ -176,6 +177,8 @@ const IdAndValue = struct { |
| 176 | }; | 177 | }; |
| 177 | 178 | ||
| 178 | test "stable sort" { | 179 | test "stable sort" { |
| 180 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 181 | |||
| 179 | const expected = [_]IdAndValue{ | 182 | const expected = [_]IdAndValue{ |
| 180 | IdAndValue{ .id = 0, .value = 0 }, | 183 | IdAndValue{ .id = 0, .value = 0 }, |
| 181 | IdAndValue{ .id = 1, .value = 0 }, | 184 | IdAndValue{ .id = 1, .value = 0 }, |
| ... | @@ -223,6 +226,8 @@ test "stable sort" { | ... | @@ -223,6 +226,8 @@ test "stable sort" { |
| 223 | } | 226 | } |
| 224 | 227 | ||
| 225 | test "sort" { | 228 | test "sort" { |
| 229 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 230 | |||
| 226 | const u8cases = [_][]const []const u8{ | 231 | const u8cases = [_][]const []const u8{ |
| 227 | &[_][]const u8{ | 232 | &[_][]const u8{ |
| 228 | "", | 233 | "", |
| ... | @@ -301,6 +306,8 @@ test "sort" { | ... | @@ -301,6 +306,8 @@ test "sort" { |
| 301 | } | 306 | } |
| 302 | 307 | ||
| 303 | test "sort descending" { | 308 | test "sort descending" { |
| 309 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 310 | |||
| 304 | const rev_cases = [_][]const []const i32{ | 311 | const rev_cases = [_][]const []const i32{ |
| 305 | &[_][]const i32{ | 312 | &[_][]const i32{ |
| 306 | &[_]i32{}, | 313 | &[_]i32{}, |
| ... | @@ -340,6 +347,8 @@ test "sort descending" { | ... | @@ -340,6 +347,8 @@ test "sort descending" { |
| 340 | } | 347 | } |
| 341 | 348 | ||
| 342 | test "sort with context in the middle of a slice" { | 349 | test "sort with context in the middle of a slice" { |
| 350 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 351 | |||
| 343 | const Context = struct { | 352 | const Context = struct { |
| 344 | items: []i32, | 353 | items: []i32, |
| 345 | 354 | ||
| ... | @@ -379,6 +388,8 @@ test "sort with context in the middle of a slice" { | ... | @@ -379,6 +388,8 @@ test "sort with context in the middle of a slice" { |
| 379 | } | 388 | } |
| 380 | 389 | ||
| 381 | test "sort fuzz testing" { | 390 | test "sort fuzz testing" { |
| 391 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 392 | |||
| 382 | var prng = std.rand.DefaultPrng.init(0x12345678); | 393 | var prng = std.rand.DefaultPrng.init(0x12345678); |
| 383 | const random = prng.random(); | 394 | const random = prng.random(); |
| 384 | const test_case_count = 10; | 395 | const test_case_count = 10; |
lib/std/treap.zig+2| ... | @@ -350,6 +350,8 @@ const TestTreap = Treap(u64, std.math.order); | ... | @@ -350,6 +350,8 @@ const TestTreap = Treap(u64, std.math.order); |
| 350 | const TestNode = TestTreap.Node; | 350 | const TestNode = TestTreap.Node; |
| 351 | 351 | ||
| 352 | test "std.Treap: insert, find, replace, remove" { | 352 | test "std.Treap: insert, find, replace, remove" { |
| 353 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 354 | |||
| 353 | var treap = TestTreap{}; | 355 | var treap = TestTreap{}; |
| 354 | var nodes: [10]TestNode = undefined; | 356 | var nodes: [10]TestNode = undefined; |
| 355 | 357 |
lib/std/zig/Parse.zig+2| ... | @@ -4102,5 +4102,7 @@ const TokenIndex = Ast.TokenIndex; | ... | @@ -4102,5 +4102,7 @@ const TokenIndex = Ast.TokenIndex; |
| 4102 | const Token = std.zig.Token; | 4102 | const Token = std.zig.Token; |
| 4103 | 4103 | ||
| 4104 | test { | 4104 | test { |
| 4105 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 4106 | |||
| 4105 | _ = @import("parser_test.zig"); | 4107 | _ = @import("parser_test.zig"); |
| 4106 | } | 4108 | } |
lib/std/zig/fmt.zig+3| ... | @@ -1,4 +1,5 @@ | ... | @@ -1,4 +1,5 @@ |
| 1 | const std = @import("std"); | 1 | const std = @import("std"); |
| 2 | const builtin = @import("builtin"); | ||
| 2 | const mem = std.mem; | 3 | const mem = std.mem; |
| 3 | 4 | ||
| 4 | /// Print the string as a Zig identifier escaping it with @"" syntax if needed. | 5 | /// Print the string as a Zig identifier escaping it with @"" syntax if needed. |
| ... | @@ -95,6 +96,8 @@ pub fn fmtEscapes(bytes: []const u8) std.fmt.Formatter(stringEscape) { | ... | @@ -95,6 +96,8 @@ pub fn fmtEscapes(bytes: []const u8) std.fmt.Formatter(stringEscape) { |
| 95 | } | 96 | } |
| 96 | 97 | ||
| 97 | test "escape invalid identifiers" { | 98 | test "escape invalid identifiers" { |
| 99 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 100 | |||
| 98 | const expectFmt = std.testing.expectFmt; | 101 | const expectFmt = std.testing.expectFmt; |
| 99 | try expectFmt("@\"while\"", "{}", .{fmtId("while")}); | 102 | try expectFmt("@\"while\"", "{}", .{fmtId("while")}); |
| 100 | try expectFmt("hello", "{}", .{fmtId("hello")}); | 103 | try expectFmt("hello", "{}", .{fmtId("hello")}); |
lib/std/zig/tokenizer.zig+10-1| ... | @@ -1,4 +1,5 @@ | ... | @@ -1,4 +1,5 @@ |
| 1 | const std = @import("../std.zig"); | 1 | const std = @import("../std.zig"); |
| 2 | const builtin = @import("builtin"); | ||
| 2 | 3 | ||
| 3 | pub const Token = struct { | 4 | pub const Token = struct { |
| 4 | tag: Tag, | 5 | tag: Tag, |
| ... | @@ -1449,6 +1450,8 @@ test "chars" { | ... | @@ -1449,6 +1450,8 @@ test "chars" { |
| 1449 | } | 1450 | } |
| 1450 | 1451 | ||
| 1451 | test "invalid token characters" { | 1452 | test "invalid token characters" { |
| 1453 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1454 | |||
| 1452 | try testTokenize("#", &.{.invalid}); | 1455 | try testTokenize("#", &.{.invalid}); |
| 1453 | try testTokenize("`", &.{.invalid}); | 1456 | try testTokenize("`", &.{.invalid}); |
| 1454 | try testTokenize("'c", &.{.invalid}); | 1457 | try testTokenize("'c", &.{.invalid}); |
| ... | @@ -1478,7 +1481,7 @@ test "utf8" { | ... | @@ -1478,7 +1481,7 @@ test "utf8" { |
| 1478 | } | 1481 | } |
| 1479 | 1482 | ||
| 1480 | test "invalid utf8" { | 1483 | test "invalid utf8" { |
| 1481 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | 1484 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| 1482 | 1485 | ||
| 1483 | try testTokenize("//\x80", &.{ | 1486 | try testTokenize("//\x80", &.{ |
| 1484 | .invalid, | 1487 | .invalid, |
| ... | @@ -1570,6 +1573,8 @@ test "pipe and then invalid" { | ... | @@ -1570,6 +1573,8 @@ test "pipe and then invalid" { |
| 1570 | } | 1573 | } |
| 1571 | 1574 | ||
| 1572 | test "line comment and doc comment" { | 1575 | test "line comment and doc comment" { |
| 1576 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1577 | |||
| 1573 | try testTokenize("//", &.{}); | 1578 | try testTokenize("//", &.{}); |
| 1574 | try testTokenize("// a / b", &.{}); | 1579 | try testTokenize("// a / b", &.{}); |
| 1575 | try testTokenize("// /", &.{}); | 1580 | try testTokenize("// /", &.{}); |
| ... | @@ -1644,6 +1649,8 @@ test "range literals" { | ... | @@ -1644,6 +1649,8 @@ test "range literals" { |
| 1644 | } | 1649 | } |
| 1645 | 1650 | ||
| 1646 | test "number literals decimal" { | 1651 | test "number literals decimal" { |
| 1652 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1653 | |||
| 1647 | try testTokenize("0", &.{.number_literal}); | 1654 | try testTokenize("0", &.{.number_literal}); |
| 1648 | try testTokenize("1", &.{.number_literal}); | 1655 | try testTokenize("1", &.{.number_literal}); |
| 1649 | try testTokenize("2", &.{.number_literal}); | 1656 | try testTokenize("2", &.{.number_literal}); |
| ... | @@ -1892,6 +1899,8 @@ test "invalid token with unfinished escape right before eof" { | ... | @@ -1892,6 +1899,8 @@ test "invalid token with unfinished escape right before eof" { |
| 1892 | } | 1899 | } |
| 1893 | 1900 | ||
| 1894 | test "saturating operators" { | 1901 | test "saturating operators" { |
| 1902 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1903 | |||
| 1895 | try testTokenize("<<", &.{.angle_bracket_angle_bracket_left}); | 1904 | try testTokenize("<<", &.{.angle_bracket_angle_bracket_left}); |
| 1896 | try testTokenize("<<|", &.{.angle_bracket_angle_bracket_left_pipe}); | 1905 | try testTokenize("<<|", &.{.angle_bracket_angle_bracket_left_pipe}); |
| 1897 | try testTokenize("<<|=", &.{.angle_bracket_angle_bracket_left_pipe_equal}); | 1906 | try testTokenize("<<|=", &.{.angle_bracket_angle_bracket_left_pipe_equal}); |
test/tests.zig+4-2| ... | @@ -1002,8 +1002,10 @@ pub fn addModuleTests(b: *std.Build, options: ModuleTestOptions) *Step { | ... | @@ -1002,8 +1002,10 @@ pub fn addModuleTests(b: *std.Build, options: ModuleTestOptions) *Step { |
| 1002 | test_target.use_llvm == false and mem.eql(u8, options.name, "universal-libc")) | 1002 | test_target.use_llvm == false and mem.eql(u8, options.name, "universal-libc")) |
| 1003 | continue; | 1003 | continue; |
| 1004 | 1004 | ||
| 1005 | // TODO get std lib tests passing for self-hosted backends. | 1005 | // TODO get std lib tests passing for other self-hosted backends. |
| 1006 | if (test_target.use_llvm == false and mem.eql(u8, options.name, "std")) | 1006 | if ((test_target.target.getCpuArch() != .x86_64 or |
| 1007 | test_target.target.os_tag != .linux) and | ||
| 1008 | test_target.use_llvm == false and mem.eql(u8, options.name, "std")) | ||
| 1007 | continue; | 1009 | continue; |
| 1008 | 1010 | ||
| 1009 | const want_this_mode = for (options.optimize_modes) |m| { | 1011 | const want_this_mode = for (options.optimize_modes) |m| { |