Skip to content

Pack small hash tables (up to 6 entries) #84

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 8 commits into from
Prev Previous commit
Next Next commit
st: test when delete_safe forces iteration of packed table to fail
  • Loading branch information
funny-falcon committed Mar 8, 2012
commit 62fe1ff7eee6c66cc813cbb8f7af24e62cd1c857
13 changes: 13 additions & 0 deletions test/-ext-/st/test_numhash.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,18 @@ def test_size_after_delete_safe
assert_equal(up - 1, tbl.size, "delete_safe doesn't change size from #{up} to #{up-1}")
end
end

def test_delete_safe_on_iteration
10.downto(1) do |up|
tbl = Bug::StNumHash.new
1.upto(up){|i| tbl[i] = i}
assert_nothing_raised("delete_safe forces iteration to fail with size #{up}") do
tbl.each do |k, v, t|
assert_equal k, t.delete_safe(k)
true
end
end
end
end
end
end
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy