diff options
author | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-11-24 17:14:06 +0000 |
---|---|---|
committer | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-11-24 17:14:06 +0000 |
commit | 6c1bfbe478c5b7698ba9c96e61a2a597b44d4d16 (patch) | |
tree | 991351e4fbea13ce26b571f502555bac8a9ce007 /test/ruby/test_syntax.rb | |
parent | 7b298723b08e30d336f6172a6d4f6d9dea3a5a8e (diff) | |
download | ruby-6c1bfbe478c5b7698ba9c96e61a2a597b44d4d16.tar.gz |
Fix tests of rb_warning().
* test/ruby/envutil.rb (Test::Unit::Assertions#assert_warning)
(Test::Unit::Assertions#assert_warn), test/ruby/envutil.rb,
test/ruby/test_enumerator.rb, test/ruby/test_io_m17n.rb,
test/ruby/test_regexp.rb, test/ruby/test_syntax.rb:
assert_warn() and assert_warning() are reversed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37836 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_syntax.rb')
-rw-r--r-- | test/ruby/test_syntax.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/ruby/test_syntax.rb b/test/ruby/test_syntax.rb index 49522c42cd..ec3af712f4 100644 --- a/test/ruby/test_syntax.rb +++ b/test/ruby/test_syntax.rb @@ -111,13 +111,13 @@ class TestSyntax < Test::Unit::TestCase def test_warn_grouped_expression bug5214 = '[ruby-core:39050]' - assert_warn("", bug5214) do + assert_warning("", bug5214) do assert_valid_syntax("foo \\\n(\n true)", "test") {$VERBOSE = true} end end def test_warn_unreachable - assert_warn("test:3: warning: statement not reached\n") do + assert_warning("test:3: warning: statement not reached\n") do code = "loop do\n" "break\n" "foo\n" "end" assert_valid_syntax(code, "test") {$VERBOSE = true} end @@ -150,7 +150,7 @@ class TestSyntax < Test::Unit::TestCase def test_duplicated_when w = 'warning: duplicated when clause is ignored' - assert_warn(/3: #{w}.+4: #{w}.+4: #{w}.+5: #{w}.+5: #{w}/m){ + assert_warning(/3: #{w}.+4: #{w}.+4: #{w}.+5: #{w}.+5: #{w}/m){ eval %q{ case 1 when 1, 1 @@ -159,7 +159,7 @@ class TestSyntax < Test::Unit::TestCase end } } - assert_warn(/#{w}/){#/3: #{w}.+4: #{w}.+5: #{w}.+5: #{w}/m){ + assert_warning(/#{w}/){#/3: #{w}.+4: #{w}.+5: #{w}.+5: #{w}/m){ a = 1 eval %q{ case 1 |