Skip to content

Commit

Permalink
Add spec tests to * to check for *0
Browse files Browse the repository at this point in the history
  • Loading branch information
GarrisonJ committed Apr 29, 2024
1 parent 1f6f64b commit e4747be
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions spec/sorted_array_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@
array *= 2
expect(array.to_a).to eq(((1..1000).to_a * 2).sort)
end

it "should multiply the array by 0" do
array = SortedContainers::SortedArray.new([1, 2, 3, 4, 5])
array *= 0
expect(array.to_a).to eq([])
end
end

describe "+" do
Expand Down

0 comments on commit e4747be

Please sign in to comment.