Skip to content

Commit

Permalink
Improve assertions in the random usage test
Browse files Browse the repository at this point in the history
  • Loading branch information
mhib committed Oct 13, 2024
1 parent ba34bb5 commit 962088b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/pairing_heap_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ def included(ancestor)
sorted_items << queue.pop until queue.empty?
sorted_items.map!(&:priority)

_(sorted_items).must_equal(sorted_items.sort)
_(sorted_items).must_equal(items.map(&:priority).sort)
end

it "does not crash with a large number of consecutive pushes" do
Expand Down Expand Up @@ -286,7 +286,7 @@ def included(ancestor)
sorted_items << queue.pop until queue.empty?
sorted_items.map!(&:priority)

_(sorted_items).must_equal(sorted_items.sort)
_(sorted_items).must_equal(items.map(&:priority).sort)
end

it "does not crash with a large number of consecutive pushes" do
Expand Down

0 comments on commit 962088b

Please sign in to comment.