diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-06-20 06:47:10 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-06-20 06:47:10 +0000 |
commit | f9a2d6b9d9e02da536e218e4c0bb021b09377a5e (patch) | |
tree | 6d90c85a535de5ad6f5c972b8344ecd54b742155 /test/ruby | |
parent | c63170c91766036078d5e8ad4efbeac06ecd8f26 (diff) | |
download | ruby-f9a2d6b9d9e02da536e218e4c0bb021b09377a5e.tar.gz |
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
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_regexp.rb | 6 |
1 files changed, 4 insertions, 2 deletions
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(/\*\+\?\{\}\|\(\)\<\>\`\'/, "*+?{}|()<>`'") |