From f9a2d6b9d9e02da536e218e4c0bb021b09377a5e Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 20 Jun 2014 06:47:10 +0000 Subject: test_regexp.rb: assert prefix * test/ruby/test_regexp.rb: rename and prefix `assert_` to show caller method names in backtrace. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46476 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_regexp.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'test/ruby/test_regexp.rb') diff --git a/test/ruby/test_regexp.rb b/test/ruby/test_regexp.rb index 031d98c439..2cd8e13352 100644 --- a/test/ruby/test_regexp.rb +++ b/test/ruby/test_regexp.rb @@ -586,7 +586,7 @@ class TestRegexp < Test::Unit::TestCase 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 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(/\*\+\?\{\}\|\(\)\<\>\`\'/, "*+?{}|()<>`'") -- cgit v1.2.3