In: |
pp.rb
|
Parent: | Test::Unit::TestCase |
S | = | Struct.new("S", :a, :b) |
# File pp.rb, line 549 def test_arraytest_array a = [] a << a assert_equal("[[...]]\n", PP.pp(a, '')) end
# File pp.rb, line 562 def test_struct a = S.new(1,2) a.b = a assert_equal("#<Struct::S a=1, b=#<Struct::S:...>>\n", PP.pp(a, '')) end
# File pp.rb, line 568 def test_object a = Object.new a.instance_eval {@a = a} assert_equal(a.inspect + "\n", PP.pp(a, '')) end
# File pp.rb, line 574 def test_anonymous a = Class.new.new assert_equal(a.inspect + "\n", PP.pp(a, '')) end
# File pp.rb, line 579 def test_withinspect a = [] a << HasInspect.new(a) assert_equal("[<inspect:[...]>]\n", PP.pp(a, '')) end