| author | |
| committer | |
| log | 6b36774adc407bc4c8271306410a20e13cbd55ad |
| tree | ffe7a7e3d1b5246d64c517f260d5283baf1943d5 |
| parent | 35c7e376b89f41d8260b70e770e03ef6af68849d |
14 files changed, 35 insertions(+), 0 deletions(-)
ci/zinc/linux_test.sh+1| ... | ... | @@ -59,6 +59,7 @@ stage2/bin/zig build -Dtarget=arm-linux-musleabihf # test building self-hosted f |
| 59 | 59 | # * https://github.com/ziglang/zig/issues/11367 (and corresponding workaround in compiler source) |
| 60 | 60 | # * https://github.com/ziglang/zig/pull/11492#issuecomment-1112871321 |
| 61 | 61 | stage2/bin/zig build test-behavior -fqemu -fwasmtime |
| 62 | stage2/bin/zig test lib/std/std.zig --zig-lib-dir lib | |
| 62 | 63 | |
| 63 | 64 | $ZIG build test-behavior -fqemu -fwasmtime -Domit-stage2 |
| 64 | 65 | $ZIG build test-compiler-rt -fqemu -fwasmtime |
lib/std/bit_set.zig+4| ... | ... | @@ -1330,6 +1330,7 @@ fn testStaticBitSet(comptime Set: type) !void { |
| 1330 | 1330 | } |
| 1331 | 1331 | |
| 1332 | 1332 | test "IntegerBitSet" { |
| 1333 | if (@import("builtin").zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 1333 | 1334 | try testStaticBitSet(IntegerBitSet(0)); |
| 1334 | 1335 | try testStaticBitSet(IntegerBitSet(1)); |
| 1335 | 1336 | try testStaticBitSet(IntegerBitSet(2)); |
| ... | ... | @@ -1341,6 +1342,7 @@ test "IntegerBitSet" { |
| 1341 | 1342 | } |
| 1342 | 1343 | |
| 1343 | 1344 | test "ArrayBitSet" { |
| 1345 | if (@import("builtin").zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 1344 | 1346 | if (@import("builtin").cpu.arch == .aarch64) { |
| 1345 | 1347 | // https://github.com/ziglang/zig/issues/9879 |
| 1346 | 1348 | return error.SkipZigTest; |
| ... | ... | @@ -1355,6 +1357,7 @@ test "ArrayBitSet" { |
| 1355 | 1357 | } |
| 1356 | 1358 | |
| 1357 | 1359 | test "DynamicBitSetUnmanaged" { |
| 1360 | if (@import("builtin").zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 1358 | 1361 | const allocator = std.testing.allocator; |
| 1359 | 1362 | var a = try DynamicBitSetUnmanaged.initEmpty(allocator, 300); |
| 1360 | 1363 | try testing.expectEqual(@as(usize, 0), a.count()); |
| ... | ... | @@ -1395,6 +1398,7 @@ test "DynamicBitSetUnmanaged" { |
| 1395 | 1398 | } |
| 1396 | 1399 | |
| 1397 | 1400 | test "DynamicBitSet" { |
| 1401 | if (@import("builtin").zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 1398 | 1402 | const allocator = std.testing.allocator; |
| 1399 | 1403 | var a = try DynamicBitSet.initEmpty(allocator, 300); |
| 1400 | 1404 | try testing.expectEqual(@as(usize, 0), a.count()); |
lib/std/crypto/argon2.zig+2| ... | ... | @@ -897,6 +897,7 @@ test "kdf" { |
| 897 | 897 | } |
| 898 | 898 | |
| 899 | 899 | test "phc format hasher" { |
| 900 | if (@import("builtin").zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 900 | 901 | const allocator = std.testing.allocator; |
| 901 | 902 | const password = "testpass"; |
| 902 | 903 | |
| ... | ... | @@ -912,6 +913,7 @@ test "phc format hasher" { |
| 912 | 913 | } |
| 913 | 914 | |
| 914 | 915 | test "password hash and password verify" { |
| 916 | if (@import("builtin").zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 915 | 917 | const allocator = std.testing.allocator; |
| 916 | 918 | const password = "testpass"; |
| 917 | 919 |
lib/std/crypto/bcrypt.zig+1| ... | ... | @@ -802,6 +802,7 @@ test "bcrypt crypt format" { |
| 802 | 802 | } |
| 803 | 803 | |
| 804 | 804 | test "bcrypt phc format" { |
| 805 | if (@import("builtin").zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 805 | 806 | const hash_options = HashOptions{ |
| 806 | 807 | .params = .{ .rounds_log = 5 }, |
| 807 | 808 | .encoding = .phc, |
lib/std/crypto/phc_encoding.zig+1| ... | ... | @@ -260,6 +260,7 @@ fn kvSplit(str: []const u8) !struct { key: []const u8, value: []const u8 } { |
| 260 | 260 | } |
| 261 | 261 | |
| 262 | 262 | test "phc format - encoding/decoding" { |
| 263 | if (@import("builtin").zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 263 | 264 | const Input = struct { |
| 264 | 265 | str: []const u8, |
| 265 | 266 | HashResult: type, |
lib/std/crypto/scrypt.zig+1| ... | ... | @@ -683,6 +683,7 @@ test "unix-scrypt" { |
| 683 | 683 | } |
| 684 | 684 | |
| 685 | 685 | test "crypt format" { |
| 686 | if (@import("builtin").zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 686 | 687 | const str = "$7$C6..../....SodiumChloride$kBGj9fHznVYFQMEn/qDCfrDevf9YDtcDdKvEqHJLV8D"; |
| 687 | 688 | const params = try crypt_format.deserialize(crypt_format.HashResult(32), str); |
| 688 | 689 | var buf: [str.len]u8 = undefined; |
lib/std/fmt.zig+2| ... | ... | @@ -2225,6 +2225,7 @@ test "float.scientific.precision" { |
| 2225 | 2225 | } |
| 2226 | 2226 | |
| 2227 | 2227 | test "float.special" { |
| 2228 | if (@import("builtin").zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 2228 | 2229 | try expectFmt("f64: nan", "f64: {}", .{math.nan_f64}); |
| 2229 | 2230 | // negative nan is not defined by IEE 754, |
| 2230 | 2231 | // and ARM thus normalizes it to positive nan |
| ... | ... | @@ -2236,6 +2237,7 @@ test "float.special" { |
| 2236 | 2237 | } |
| 2237 | 2238 | |
| 2238 | 2239 | test "float.hexadecimal.special" { |
| 2240 | if (@import("builtin").zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 2239 | 2241 | try expectFmt("f64: nan", "f64: {x}", .{math.nan_f64}); |
| 2240 | 2242 | // negative nan is not defined by IEE 754, |
| 2241 | 2243 | // and ARM thus normalizes it to positive nan |
lib/std/json.zig+1| ... | ... | @@ -1355,6 +1355,7 @@ pub const Value = union(enum) { |
| 1355 | 1355 | }; |
| 1356 | 1356 | |
| 1357 | 1357 | test "Value.jsonStringify" { |
| 1358 | if (@import("builtin").zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 1358 | 1359 | { |
| 1359 | 1360 | var buffer: [10]u8 = undefined; |
| 1360 | 1361 | var fbs = std.io.fixedBufferStream(&buffer); |
lib/std/math/copysign.zig+1| ... | ... | @@ -13,6 +13,7 @@ pub fn copysign(magnitude: anytype, sign: @TypeOf(magnitude)) @TypeOf(magnitude) |
| 13 | 13 | } |
| 14 | 14 | |
| 15 | 15 | test "math.copysign" { |
| 16 | if (@import("builtin").zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 16 | 17 | inline for ([_]type{ f16, f32, f64, f80, f128 }) |T| { |
| 17 | 18 | try expect(copysign(@as(T, 1.0), @as(T, 1.0)) == 1.0); |
| 18 | 19 | try expect(copysign(@as(T, 2.0), @as(T, -2.0)) == -2.0); |
lib/std/math/signbit.zig+1| ... | ... | @@ -10,6 +10,7 @@ pub fn signbit(x: anytype) bool { |
| 10 | 10 | } |
| 11 | 11 | |
| 12 | 12 | test "math.signbit" { |
| 13 | if (@import("builtin").zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 13 | 14 | inline for ([_]type{ f16, f32, f64, f80, f128 }) |T| { |
| 14 | 15 | try expect(!signbit(@as(T, 0.0))); |
| 15 | 16 | try expect(!signbit(@as(T, 1.0))); |
lib/std/mem.zig+1| ... | ... | @@ -2080,6 +2080,7 @@ fn testReadIntImpl() !void { |
| 2080 | 2080 | } |
| 2081 | 2081 | |
| 2082 | 2082 | test "writeIntSlice" { |
| 2083 | if (@import("builtin").zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 2083 | 2084 | try testWriteIntImpl(); |
| 2084 | 2085 | comptime try testWriteIntImpl(); |
| 2085 | 2086 | } |
lib/std/os/linux/io_uring.zig+2| ... | ... | @@ -2154,6 +2154,7 @@ test "timeout (after a number of completions)" { |
| 2154 | 2154 | } |
| 2155 | 2155 | |
| 2156 | 2156 | test "timeout_remove" { |
| 2157 | if (@import("builtin").zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 2157 | 2158 | if (builtin.os.tag != .linux) return error.SkipZigTest; |
| 2158 | 2159 | |
| 2159 | 2160 | var ring = IO_Uring.init(2, 0) catch |err| switch (err) { |
| ... | ... | @@ -2950,6 +2951,7 @@ test "provide_buffers: read" { |
| 2950 | 2951 | } |
| 2951 | 2952 | |
| 2952 | 2953 | test "remove_buffers" { |
| 2954 | if (@import("builtin").zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 2953 | 2955 | if (builtin.os.tag != .linux) return error.SkipZigTest; |
| 2954 | 2956 | |
| 2955 | 2957 | var ring = IO_Uring.init(1, 0) catch |err| switch (err) { |
lib/std/priority_queue.zig+14| ... | ... | @@ -286,6 +286,7 @@ const PQlt = PriorityQueue(u32, void, lessThan); |
| 286 | 286 | const PQgt = PriorityQueue(u32, void, greaterThan); |
| 287 | 287 | |
| 288 | 288 | test "std.PriorityQueue: add and remove min heap" { |
| 289 | if (@import("builtin").zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 289 | 290 | var queue = PQlt.init(testing.allocator, {}); |
| 290 | 291 | defer queue.deinit(); |
| 291 | 292 | |
| ... | ... | @@ -304,6 +305,7 @@ test "std.PriorityQueue: add and remove min heap" { |
| 304 | 305 | } |
| 305 | 306 | |
| 306 | 307 | test "std.PriorityQueue: add and remove same min heap" { |
| 308 | if (@import("builtin").zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 307 | 309 | var queue = PQlt.init(testing.allocator, {}); |
| 308 | 310 | defer queue.deinit(); |
| 309 | 311 | |
| ... | ... | @@ -353,6 +355,7 @@ test "std.PriorityQueue: peek" { |
| 353 | 355 | } |
| 354 | 356 | |
| 355 | 357 | test "std.PriorityQueue: sift up with odd indices" { |
| 358 | if (@import("builtin").zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 356 | 359 | var queue = PQlt.init(testing.allocator, {}); |
| 357 | 360 | defer queue.deinit(); |
| 358 | 361 | const items = [_]u32{ 15, 7, 21, 14, 13, 22, 12, 6, 7, 25, 5, 24, 11, 16, 15, 24, 2, 1 }; |
| ... | ... | @@ -367,6 +370,7 @@ test "std.PriorityQueue: sift up with odd indices" { |
| 367 | 370 | } |
| 368 | 371 | |
| 369 | 372 | test "std.PriorityQueue: addSlice" { |
| 373 | if (@import("builtin").zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 370 | 374 | var queue = PQlt.init(testing.allocator, {}); |
| 371 | 375 | defer queue.deinit(); |
| 372 | 376 | const items = [_]u32{ 15, 7, 21, 14, 13, 22, 12, 6, 7, 25, 5, 24, 11, 16, 15, 24, 2, 1 }; |
| ... | ... | @@ -412,6 +416,7 @@ test "std.PriorityQueue: fromOwnedSlice" { |
| 412 | 416 | } |
| 413 | 417 | |
| 414 | 418 | test "std.PriorityQueue: add and remove max heap" { |
| 419 | if (@import("builtin").zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 415 | 420 | var queue = PQgt.init(testing.allocator, {}); |
| 416 | 421 | defer queue.deinit(); |
| 417 | 422 | |
| ... | ... | @@ -430,6 +435,7 @@ test "std.PriorityQueue: add and remove max heap" { |
| 430 | 435 | } |
| 431 | 436 | |
| 432 | 437 | test "std.PriorityQueue: add and remove same max heap" { |
| 438 | if (@import("builtin").zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 433 | 439 | var queue = PQgt.init(testing.allocator, {}); |
| 434 | 440 | defer queue.deinit(); |
| 435 | 441 | |
| ... | ... | @@ -470,6 +476,7 @@ test "std.PriorityQueue: iterator" { |
| 470 | 476 | } |
| 471 | 477 | |
| 472 | 478 | test "std.PriorityQueue: remove at index" { |
| 479 | if (@import("builtin").zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 473 | 480 | var queue = PQlt.init(testing.allocator, {}); |
| 474 | 481 | defer queue.deinit(); |
| 475 | 482 | |
| ... | ... | @@ -505,6 +512,7 @@ test "std.PriorityQueue: iterator while empty" { |
| 505 | 512 | } |
| 506 | 513 | |
| 507 | 514 | test "std.PriorityQueue: shrinkAndFree" { |
| 515 | if (@import("builtin").zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 508 | 516 | var queue = PQlt.init(testing.allocator, {}); |
| 509 | 517 | defer queue.deinit(); |
| 510 | 518 | |
| ... | ... | @@ -528,6 +536,7 @@ test "std.PriorityQueue: shrinkAndFree" { |
| 528 | 536 | } |
| 529 | 537 | |
| 530 | 538 | test "std.PriorityQueue: update min heap" { |
| 539 | if (@import("builtin").zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 531 | 540 | var queue = PQlt.init(testing.allocator, {}); |
| 532 | 541 | defer queue.deinit(); |
| 533 | 542 | |
| ... | ... | @@ -543,6 +552,7 @@ test "std.PriorityQueue: update min heap" { |
| 543 | 552 | } |
| 544 | 553 | |
| 545 | 554 | test "std.PriorityQueue: update same min heap" { |
| 555 | if (@import("builtin").zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 546 | 556 | var queue = PQlt.init(testing.allocator, {}); |
| 547 | 557 | defer queue.deinit(); |
| 548 | 558 | |
| ... | ... | @@ -559,6 +569,7 @@ test "std.PriorityQueue: update same min heap" { |
| 559 | 569 | } |
| 560 | 570 | |
| 561 | 571 | test "std.PriorityQueue: update max heap" { |
| 572 | if (@import("builtin").zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 562 | 573 | var queue = PQgt.init(testing.allocator, {}); |
| 563 | 574 | defer queue.deinit(); |
| 564 | 575 | |
| ... | ... | @@ -574,6 +585,7 @@ test "std.PriorityQueue: update max heap" { |
| 574 | 585 | } |
| 575 | 586 | |
| 576 | 587 | test "std.PriorityQueue: update same max heap" { |
| 588 | if (@import("builtin").zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 577 | 589 | var queue = PQgt.init(testing.allocator, {}); |
| 578 | 590 | defer queue.deinit(); |
| 579 | 591 | |
| ... | ... | @@ -590,6 +602,7 @@ test "std.PriorityQueue: update same max heap" { |
| 590 | 602 | } |
| 591 | 603 | |
| 592 | 604 | test "std.PriorityQueue: siftUp in remove" { |
| 605 | if (@import("builtin").zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 593 | 606 | var queue = PQlt.init(testing.allocator, {}); |
| 594 | 607 | defer queue.deinit(); |
| 595 | 608 | |
| ... | ... | @@ -610,6 +623,7 @@ fn contextLessThan(context: []const u32, a: usize, b: usize) Order { |
| 610 | 623 | const CPQlt = PriorityQueue(usize, []const u32, contextLessThan); |
| 611 | 624 | |
| 612 | 625 | test "std.PriorityQueue: add and remove min heap with contextful comparator" { |
| 626 | if (@import("builtin").zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 613 | 627 | const context = [_]u32{ 5, 3, 4, 2, 2, 8, 0 }; |
| 614 | 628 | |
| 615 | 629 | var queue = CPQlt.init(testing.allocator, context[0..]); |
lib/std/tz.zig+3| ... | ... | @@ -214,6 +214,7 @@ pub const Tz = struct { |
| 214 | 214 | }; |
| 215 | 215 | |
| 216 | 216 | test "slim" { |
| 217 | if (@import("builtin").zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 217 | 218 | const data = @embedFile("tz/asia_tokyo.tzif"); |
| 218 | 219 | var in_stream = std.io.fixedBufferStream(data); |
| 219 | 220 | |
| ... | ... | @@ -227,6 +228,7 @@ test "slim" { |
| 227 | 228 | } |
| 228 | 229 | |
| 229 | 230 | test "fat" { |
| 231 | if (@import("builtin").zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 230 | 232 | const data = @embedFile("tz/antarctica_davis.tzif"); |
| 231 | 233 | var in_stream = std.io.fixedBufferStream(data); |
| 232 | 234 | |
| ... | ... | @@ -239,6 +241,7 @@ test "fat" { |
| 239 | 241 | } |
| 240 | 242 | |
| 241 | 243 | test "legacy" { |
| 244 | if (@import("builtin").zig_backend != .stage1) return error.SkipZigTest; // TODO | |
| 242 | 245 | // Taken from Slackware 8.0, from 2001 |
| 243 | 246 | const data = @embedFile("tz/europe_vatican.tzif"); |
| 244 | 247 | var in_stream = std.io.fixedBufferStream(data); |