summaryrefslogtreecommitdiff
path: root/test/ruby/test_backtrace.rb
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-12-01 12:19:52 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-12-01 12:19:52 +0000
commit095022cbe91ff03af27c19bbe47a819e1323f004 (patch)
tree54dfd51a11b5921ef6980620fcc6e8006e810bef /test/ruby/test_backtrace.rb
parentc906e879d8e83263752a25faf34cc102a7b2e60e (diff)
* 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
Diffstat (limited to 'test/ruby/test_backtrace.rb')
-rw-r--r--test/ruby/test_backtrace.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/ruby/test_backtrace.rb b/test/ruby/test_backtrace.rb
index ebbde9f060..bd65e40036 100644
--- a/test/ruby/test_backtrace.rb
+++ b/test/ruby/test_backtrace.rb
@@ -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