Debian Codegraph @

test/-ext-/string/test_nofree.rb

raw
1 # frozen_string_literal: false
2 require 'test/unit'
3
4 class Test_StringNoFree < Test::Unit::TestCase
5 def test_no_memory_leak
6 bug10942 = '[ruby-core:68436] [Bug #10942] no leak on nofree string'
7 code = '.times {Bug::String.nofree << "a" * 100}'
8 assert_no_memory_leak(%w(-r-test-/string),
9 "100_000#{code}",
10 "1_000_000#{code}",
11 bug10942, rss: true)
12 end
13 end