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

ruby-changes:34395

From: nobu <ko1@a...>
Date: Fri, 20 Jun 2014 15:47:15 +0900 (JST)
Subject: [ruby-changes:34395] nobu:r46476 (trunk): test_regexp.rb: assert prefix

nobu	2014-06-20 15:47:10 +0900 (Fri, 20 Jun 2014)

  New Revision: 46476

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

  Log:
    test_regexp.rb: assert prefix
    
    * test/ruby/test_regexp.rb: rename and prefix `assert_` to show
      caller method names in backtrace.

  Modified files:
    trunk/test/ruby/test_regexp.rb
Index: test/ruby/test_regexp.rb
===================================================================
--- test/ruby/test_regexp.rb	(revision 46475)
+++ test/ruby/test_regexp.rb	(revision 46476)
@@ -586,7 +586,7 @@ class TestRegexp < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_regexp.rb#L586
     assert_predicate(m, :tainted?)
   end
 
-  def check(re, ss, fs = [], msg = nil)
+  def assert_regexp(re, ss, fs = [], msg = nil)
     re = Regexp.new(re) unless re.is_a?(Regexp)
     ss = [ss] unless ss.is_a?(Array)
     ss.each do |e, s|
@@ -598,10 +598,12 @@ class TestRegexp < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_regexp.rb#L598
     fs = [fs] unless fs.is_a?(Array)
     fs.each {|s| assert_no_match(re, s, msg) }
   end
+  alias check assert_regexp
 
-  def failcheck(re)
+  def assert_fail(re)
     assert_raise(RegexpError) { %r"#{ re }" }
   end
+  alias failcheck assert_fail
 
   def test_parse
     check(/\*\+\?\{\}\|\(\)\<\>\`\'/, "*+?{}|()<>`'")

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

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