[前][次][番号順一覧][スレッド一覧]

ruby-changes:26065

From: ko1 <ko1@a...>
Date: Sat, 1 Dec 2012 21:20:03 +0900 (JST)
Subject: [ruby-changes:26065] ko1:r38122 (trunk): * test/ruby/test_backtrace.rb: add a test for

ko1	2012-12-01 21:19:52 +0900 (Sat, 01 Dec 2012)

  New Revision: 38122

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=38122

  Log:
    * 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.

  Modified files:
    trunk/ChangeLog
    trunk/test/ruby/test_backtrace.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 38121)
+++ ChangeLog	(revision 38122)
@@ -1,3 +1,10 @@
+Sat Dec  1 21:18:19 2012  Koichi Sasada  <ko1@a...>
+
+	* 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.
+
 Sat Dec  1 21:06:58 2012  Koichi Sasada  <ko1@a...>
 
 	* vm_backtrace.c (location_inspect_m): add
Index: test/ruby/test_backtrace.rb
===================================================================
--- test/ruby/test_backtrace.rb	(revision 38121)
+++ test/ruby/test_backtrace.rb	(revision 38122)
@@ -92,6 +92,14 @@
     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

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]