mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* test/ruby/test_backtrace.rb: add a test for
Thread::Backtrace::Location#inspect. BTW, tests for `caller_locations' are not enough. Any volunteers are welcome. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38122 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
c906e879d8
commit
095022cbe9
2 changed files with 15 additions and 0 deletions
|
@ -92,6 +92,14 @@ class TestBacktrace < Test::Unit::TestCase
|
|||
assert_equal(cs, locs)
|
||||
end
|
||||
|
||||
def test_caller_locations_to_s_inspect
|
||||
cs = caller(0); locs = caller_locations(0)
|
||||
cs.zip(locs){|str, loc|
|
||||
assert_equal(str, loc.to_s)
|
||||
assert_equal(str.inspect, loc.inspect)
|
||||
}
|
||||
end
|
||||
|
||||
def th_rec q, n=10
|
||||
if n > 1
|
||||
th_rec q, n-1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue