Skip to content

Commit

Permalink
Add spec to manual specs (too slow)
Browse files Browse the repository at this point in the history
  • Loading branch information
ysbaddaden committed Jan 16, 2025
1 parent 89895e3 commit ff21c9f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions spec/manual/hash_large_spec.cr
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
require "spec"

it "creates Hash at maximum capacity" do
# we don't try to go as high as Int32::MAX because it would allocate 18GB of
# memory in total. This already tests for Int32 overflows while 'only' needing
# 4.5GB of memory.
Hash(Int32, Int32).new(initial_capacity: (Int32::MAX // 4) + 1)
end

0 comments on commit ff21c9f

Please sign in to comment.