From 6c1bfbe478c5b7698ba9c96e61a2a597b44d4d16 Mon Sep 17 00:00:00 2001 From: knu Date: Sat, 24 Nov 2012 17:14:06 +0000 Subject: 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 --- test/ruby/test_syntax.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'test/ruby/test_syntax.rb') 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 -- cgit v1.2.3