diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-12-31 16:23:16 -0500 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-12-31 16:23:16 -0500 |
| commit | 2fcf1939bb295887592c1f24f7b8fbb10efcfcba (patch) | |
| tree | 6e2759c52533b159f5cd7f67459941b10c863fb3 /test | |
| parent | 8df0cc41c95e6c01d9c4c0fd1f57fbe96f40bbe7 (diff) | |
Fix for heap_pop() test in arrays
Diffstat (limited to 'test')
| -rw-r--r-- | test/arrays.tm | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/arrays.tm b/test/arrays.tm index e32ee598..965ef95c 100644 --- a/test/arrays.tm +++ b/test/arrays.tm @@ -105,16 +105,16 @@ func main(): >> heap:heapify() >> heap sorted := @[:Int] - while heap.length > 0: - sorted:insert(heap:heap_pop()) + repeat: + sorted:insert(heap:heap_pop() or stop) >> sorted == sorted:sorted() = yes for _ in 10: heap:heap_push(random:int(1, 50)) >> heap sorted = @[:Int] - while heap.length > 0: - sorted:insert(heap:heap_pop()) + repeat: + sorted:insert(heap:heap_pop() or stop) >> sorted == sorted:sorted() = yes |
