| ... | @@ -286,7 +286,6 @@ const PQlt = PriorityQueue(u32, void, lessThan); | ... | @@ -286,7 +286,6 @@ const PQlt = PriorityQueue(u32, void, lessThan); |
| 286 | const PQgt = PriorityQueue(u32, void, greaterThan); | 286 | const PQgt = PriorityQueue(u32, void, greaterThan); |
| 287 | | 287 | |
| 288 | test "std.PriorityQueue: add and remove min heap" { | 288 | test "std.PriorityQueue: add and remove min heap" { |
| 289 | if (@import("builtin").zig_backend != .stage1) return error.SkipZigTest; // TODO | | |
| 290 | var queue = PQlt.init(testing.allocator, {}); | 289 | var queue = PQlt.init(testing.allocator, {}); |
| 291 | defer queue.deinit(); | 290 | defer queue.deinit(); |
| 292 | | 291 | |
| ... | @@ -305,7 +304,6 @@ test "std.PriorityQueue: add and remove min heap" { | ... | @@ -305,7 +304,6 @@ test "std.PriorityQueue: add and remove min heap" { |
| 305 | } | 304 | } |
| 306 | | 305 | |
| 307 | test "std.PriorityQueue: add and remove same min heap" { | 306 | test "std.PriorityQueue: add and remove same min heap" { |
| 308 | if (@import("builtin").zig_backend != .stage1) return error.SkipZigTest; // TODO | | |
| 309 | var queue = PQlt.init(testing.allocator, {}); | 307 | var queue = PQlt.init(testing.allocator, {}); |
| 310 | defer queue.deinit(); | 308 | defer queue.deinit(); |
| 311 | | 309 | |
| ... | @@ -355,7 +353,6 @@ test "std.PriorityQueue: peek" { | ... | @@ -355,7 +353,6 @@ test "std.PriorityQueue: peek" { |
| 355 | } | 353 | } |
| 356 | | 354 | |
| 357 | test "std.PriorityQueue: sift up with odd indices" { | 355 | test "std.PriorityQueue: sift up with odd indices" { |
| 358 | if (@import("builtin").zig_backend != .stage1) return error.SkipZigTest; // TODO | | |
| 359 | var queue = PQlt.init(testing.allocator, {}); | 356 | var queue = PQlt.init(testing.allocator, {}); |
| 360 | defer queue.deinit(); | 357 | defer queue.deinit(); |
| 361 | const items = [_]u32{ 15, 7, 21, 14, 13, 22, 12, 6, 7, 25, 5, 24, 11, 16, 15, 24, 2, 1 }; | 358 | const items = [_]u32{ 15, 7, 21, 14, 13, 22, 12, 6, 7, 25, 5, 24, 11, 16, 15, 24, 2, 1 }; |
| ... | @@ -370,7 +367,6 @@ test "std.PriorityQueue: sift up with odd indices" { | ... | @@ -370,7 +367,6 @@ test "std.PriorityQueue: sift up with odd indices" { |
| 370 | } | 367 | } |
| 371 | | 368 | |
| 372 | test "std.PriorityQueue: addSlice" { | 369 | test "std.PriorityQueue: addSlice" { |
| 373 | if (@import("builtin").zig_backend != .stage1) return error.SkipZigTest; // TODO | | |
| 374 | var queue = PQlt.init(testing.allocator, {}); | 370 | var queue = PQlt.init(testing.allocator, {}); |
| 375 | defer queue.deinit(); | 371 | defer queue.deinit(); |
| 376 | const items = [_]u32{ 15, 7, 21, 14, 13, 22, 12, 6, 7, 25, 5, 24, 11, 16, 15, 24, 2, 1 }; | 372 | const items = [_]u32{ 15, 7, 21, 14, 13, 22, 12, 6, 7, 25, 5, 24, 11, 16, 15, 24, 2, 1 }; |
| ... | @@ -403,7 +399,6 @@ test "std.PriorityQueue: fromOwnedSlice trivial case 1" { | ... | @@ -403,7 +399,6 @@ test "std.PriorityQueue: fromOwnedSlice trivial case 1" { |
| 403 | } | 399 | } |
| 404 | | 400 | |
| 405 | test "std.PriorityQueue: fromOwnedSlice" { | 401 | test "std.PriorityQueue: fromOwnedSlice" { |
| 406 | if (@import("builtin").zig_backend != .stage1) return error.SkipZigTest; | | |
| 407 | const items = [_]u32{ 15, 7, 21, 14, 13, 22, 12, 6, 7, 25, 5, 24, 11, 16, 15, 24, 2, 1 }; | 402 | const items = [_]u32{ 15, 7, 21, 14, 13, 22, 12, 6, 7, 25, 5, 24, 11, 16, 15, 24, 2, 1 }; |
| 408 | const heap_items = try testing.allocator.dupe(u32, items[0..]); | 403 | const heap_items = try testing.allocator.dupe(u32, items[0..]); |
| 409 | var queue = PQlt.fromOwnedSlice(testing.allocator, heap_items[0..], {}); | 404 | var queue = PQlt.fromOwnedSlice(testing.allocator, heap_items[0..], {}); |
| ... | @@ -416,7 +411,6 @@ test "std.PriorityQueue: fromOwnedSlice" { | ... | @@ -416,7 +411,6 @@ test "std.PriorityQueue: fromOwnedSlice" { |
| 416 | } | 411 | } |
| 417 | | 412 | |
| 418 | test "std.PriorityQueue: add and remove max heap" { | 413 | test "std.PriorityQueue: add and remove max heap" { |
| 419 | if (@import("builtin").zig_backend != .stage1) return error.SkipZigTest; // TODO | | |
| 420 | var queue = PQgt.init(testing.allocator, {}); | 414 | var queue = PQgt.init(testing.allocator, {}); |
| 421 | defer queue.deinit(); | 415 | defer queue.deinit(); |
| 422 | | 416 | |
| ... | @@ -435,7 +429,6 @@ test "std.PriorityQueue: add and remove max heap" { | ... | @@ -435,7 +429,6 @@ test "std.PriorityQueue: add and remove max heap" { |
| 435 | } | 429 | } |
| 436 | | 430 | |
| 437 | test "std.PriorityQueue: add and remove same max heap" { | 431 | test "std.PriorityQueue: add and remove same max heap" { |
| 438 | if (@import("builtin").zig_backend != .stage1) return error.SkipZigTest; // TODO | | |
| 439 | var queue = PQgt.init(testing.allocator, {}); | 432 | var queue = PQgt.init(testing.allocator, {}); |
| 440 | defer queue.deinit(); | 433 | defer queue.deinit(); |
| 441 | | 434 | |
| ... | @@ -476,7 +469,6 @@ test "std.PriorityQueue: iterator" { | ... | @@ -476,7 +469,6 @@ test "std.PriorityQueue: iterator" { |
| 476 | } | 469 | } |
| 477 | | 470 | |
| 478 | test "std.PriorityQueue: remove at index" { | 471 | test "std.PriorityQueue: remove at index" { |
| 479 | if (@import("builtin").zig_backend != .stage1) return error.SkipZigTest; // TODO | | |
| 480 | var queue = PQlt.init(testing.allocator, {}); | 472 | var queue = PQlt.init(testing.allocator, {}); |
| 481 | defer queue.deinit(); | 473 | defer queue.deinit(); |
| 482 | | 474 | |
| ... | @@ -512,7 +504,6 @@ test "std.PriorityQueue: iterator while empty" { | ... | @@ -512,7 +504,6 @@ test "std.PriorityQueue: iterator while empty" { |
| 512 | } | 504 | } |
| 513 | | 505 | |
| 514 | test "std.PriorityQueue: shrinkAndFree" { | 506 | test "std.PriorityQueue: shrinkAndFree" { |
| 515 | if (@import("builtin").zig_backend != .stage1) return error.SkipZigTest; // TODO | | |
| 516 | var queue = PQlt.init(testing.allocator, {}); | 507 | var queue = PQlt.init(testing.allocator, {}); |
| 517 | defer queue.deinit(); | 508 | defer queue.deinit(); |
| 518 | | 509 | |
| ... | @@ -536,7 +527,6 @@ test "std.PriorityQueue: shrinkAndFree" { | ... | @@ -536,7 +527,6 @@ test "std.PriorityQueue: shrinkAndFree" { |
| 536 | } | 527 | } |
| 537 | | 528 | |
| 538 | test "std.PriorityQueue: update min heap" { | 529 | test "std.PriorityQueue: update min heap" { |
| 539 | if (@import("builtin").zig_backend != .stage1) return error.SkipZigTest; // TODO | | |
| 540 | var queue = PQlt.init(testing.allocator, {}); | 530 | var queue = PQlt.init(testing.allocator, {}); |
| 541 | defer queue.deinit(); | 531 | defer queue.deinit(); |
| 542 | | 532 | |
| ... | @@ -552,7 +542,6 @@ test "std.PriorityQueue: update min heap" { | ... | @@ -552,7 +542,6 @@ test "std.PriorityQueue: update min heap" { |
| 552 | } | 542 | } |
| 553 | | 543 | |
| 554 | test "std.PriorityQueue: update same min heap" { | 544 | test "std.PriorityQueue: update same min heap" { |
| 555 | if (@import("builtin").zig_backend != .stage1) return error.SkipZigTest; // TODO | | |
| 556 | var queue = PQlt.init(testing.allocator, {}); | 545 | var queue = PQlt.init(testing.allocator, {}); |
| 557 | defer queue.deinit(); | 546 | defer queue.deinit(); |
| 558 | | 547 | |
| ... | @@ -569,7 +558,6 @@ test "std.PriorityQueue: update same min heap" { | ... | @@ -569,7 +558,6 @@ test "std.PriorityQueue: update same min heap" { |
| 569 | } | 558 | } |
| 570 | | 559 | |
| 571 | test "std.PriorityQueue: update max heap" { | 560 | test "std.PriorityQueue: update max heap" { |
| 572 | if (@import("builtin").zig_backend != .stage1) return error.SkipZigTest; // TODO | | |
| 573 | var queue = PQgt.init(testing.allocator, {}); | 561 | var queue = PQgt.init(testing.allocator, {}); |
| 574 | defer queue.deinit(); | 562 | defer queue.deinit(); |
| 575 | | 563 | |
| ... | @@ -585,7 +573,6 @@ test "std.PriorityQueue: update max heap" { | ... | @@ -585,7 +573,6 @@ test "std.PriorityQueue: update max heap" { |
| 585 | } | 573 | } |
| 586 | | 574 | |
| 587 | test "std.PriorityQueue: update same max heap" { | 575 | test "std.PriorityQueue: update same max heap" { |
| 588 | if (@import("builtin").zig_backend != .stage1) return error.SkipZigTest; // TODO | | |
| 589 | var queue = PQgt.init(testing.allocator, {}); | 576 | var queue = PQgt.init(testing.allocator, {}); |
| 590 | defer queue.deinit(); | 577 | defer queue.deinit(); |
| 591 | | 578 | |
| ... | @@ -602,7 +589,6 @@ test "std.PriorityQueue: update same max heap" { | ... | @@ -602,7 +589,6 @@ test "std.PriorityQueue: update same max heap" { |
| 602 | } | 589 | } |
| 603 | | 590 | |
| 604 | test "std.PriorityQueue: siftUp in remove" { | 591 | test "std.PriorityQueue: siftUp in remove" { |
| 605 | if (@import("builtin").zig_backend != .stage1) return error.SkipZigTest; // TODO | | |
| 606 | var queue = PQlt.init(testing.allocator, {}); | 592 | var queue = PQlt.init(testing.allocator, {}); |
| 607 | defer queue.deinit(); | 593 | defer queue.deinit(); |
| 608 | | 594 | |
| ... | @@ -623,7 +609,6 @@ fn contextLessThan(context: []const u32, a: usize, b: usize) Order { | ... | @@ -623,7 +609,6 @@ fn contextLessThan(context: []const u32, a: usize, b: usize) Order { |
| 623 | const CPQlt = PriorityQueue(usize, []const u32, contextLessThan); | 609 | const CPQlt = PriorityQueue(usize, []const u32, contextLessThan); |
| 624 | | 610 | |
| 625 | test "std.PriorityQueue: add and remove min heap with contextful comparator" { | 611 | test "std.PriorityQueue: add and remove min heap with contextful comparator" { |
| 626 | if (@import("builtin").zig_backend != .stage1) return error.SkipZigTest; // TODO | | |
| 627 | const context = [_]u32{ 5, 3, 4, 2, 2, 8, 0 }; | 612 | const context = [_]u32{ 5, 3, 4, 2, 2, 8, 0 }; |
| 628 | | 613 | |
| 629 | var queue = CPQlt.init(testing.allocator, context[0..]); | 614 | var queue = CPQlt.init(testing.allocator, context[0..]); |