1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

adjust indent [ci skip]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57262 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2017-01-04 00:30:45 +00:00
parent e758e9dab8
commit 2c1aa78820

View file

@ -100,7 +100,8 @@ class TestObjSpace < Test::Unit::TestCase
end end
def test_reachable_objects_from def test_reachable_objects_from
assert_separately %w[--disable-gem -robjspace], __FILE__, __LINE__, <<-'eom' assert_separately %w[--disable-gem -robjspace], "#{<<-"begin;"}\n#{<<-'end;'}"
begin;
assert_equal(nil, ObjectSpace.reachable_objects_from(nil)) assert_equal(nil, ObjectSpace.reachable_objects_from(nil))
assert_equal([Array, 'a', 'b', 'c'], ObjectSpace.reachable_objects_from(['a', 'b', 'c'])) assert_equal([Array, 'a', 'b', 'c'], ObjectSpace.reachable_objects_from(['a', 'b', 'c']))
@ -122,7 +123,7 @@ class TestObjSpace < Test::Unit::TestCase
end end
} }
assert_operator(max, :>=, long_ary.size+1, "1000 elems + Array class") assert_operator(max, :>=, long_ary.size+1, "1000 elems + Array class")
eom end;
end end
def test_reachable_objects_from_root def test_reachable_objects_from_root
@ -138,7 +139,8 @@ class TestObjSpace < Test::Unit::TestCase
end end
def test_reachable_objects_size def test_reachable_objects_size
assert_separately %w[--disable-gem -robjspace], __FILE__, __LINE__, <<-'eom' assert_separately %w[--disable-gem -robjspace], "#{<<~"begin;"}\n#{<<~'end;'}"
begin;
ObjectSpace.each_object{|o| ObjectSpace.each_object{|o|
ObjectSpace.reachable_objects_from(o).each{|reached_obj| ObjectSpace.reachable_objects_from(o).each{|reached_obj|
size = ObjectSpace.memsize_of(reached_obj) size = ObjectSpace.memsize_of(reached_obj)
@ -146,7 +148,7 @@ class TestObjSpace < Test::Unit::TestCase
assert_operator(size, :>=, 0) assert_operator(size, :>=, 0)
} }
} }
eom end;
end end
def test_trace_object_allocations def test_trace_object_allocations
@ -276,7 +278,8 @@ class TestObjSpace < Test::Unit::TestCase
end end
def test_dump_all_full def test_dump_all_full
assert_in_out_err(%w[-robjspace], <<-'end;') do |output, error| assert_in_out_err(%w[-robjspace], "#{<<-"begin;"}\n#{<<-'end;'}") do |output, error|
begin;
def dump_my_heap_please def dump_my_heap_please
ObjectSpace.dump_all(output: :stdout, full: true) ObjectSpace.dump_all(output: :stdout, full: true)
end end
@ -291,7 +294,8 @@ class TestObjSpace < Test::Unit::TestCase
def test_dump_all def test_dump_all
entry = /"bytesize":11, "value":"TEST STRING", "encoding":"UTF-8", "file":"-", "line":4, "method":"dump_my_heap_please", "generation":/ entry = /"bytesize":11, "value":"TEST STRING", "encoding":"UTF-8", "file":"-", "line":4, "method":"dump_my_heap_please", "generation":/
assert_in_out_err(%w[-robjspace], <<-'end;') do |output, error| assert_in_out_err(%w[-robjspace], "#{<<-"begin;"}#{<<-'end;'}") do |output, error|
begin;
def dump_my_heap_please def dump_my_heap_please
ObjectSpace.trace_object_allocations_start ObjectSpace.trace_object_allocations_start
GC.start GC.start
@ -304,7 +308,8 @@ class TestObjSpace < Test::Unit::TestCase
assert_match(entry, output.grep(/TEST STRING/).join("\n")) assert_match(entry, output.grep(/TEST STRING/).join("\n"))
end end
assert_in_out_err(%w[-robjspace], <<-'end;') do |(output), (error)| assert_in_out_err(%w[-robjspace], "#{<<-"begin;"}#{<<-'end;'}") do |(output), (error)|
begin;
def dump_my_heap_please def dump_my_heap_please
ObjectSpace.trace_object_allocations_start ObjectSpace.trace_object_allocations_start
GC.start GC.start