From db824a34dd324685a919e19ffed486ce9a968088 Mon Sep 17 00:00:00 2001 From: nahi Date: Tue, 20 Sep 2005 13:32:40 +0000 Subject: [PATCH] * test/wsdl/simpletype/rpc/test_rpc.rb, test/wsdl/ref/test_ref.rb, test/wsdl/any/test_any.rb test/soap/wsdlDriver/test_calc.rb: suppress deliberate warnings with $VERBOSE = nil. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9252 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 6 ++++++ test/soap/wsdlDriver/test_calc.rb | 14 +++++++++++++- test/wsdl/any/test_any.rb | 14 +++++++++++++- test/wsdl/ref/test_ref.rb | 14 +++++++++++++- test/wsdl/simpletype/rpc/test_rpc.rb | 14 +++++++++++++- 5 files changed, 58 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index ad9d1161b9..8a164d3c40 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Tue Sep 20 22:29:49 2005 NAKAMURA, Hiroshi + + * test/wsdl/simpletype/rpc/test_rpc.rb, test/wsdl/ref/test_ref.rb, + test/wsdl/any/test_any.rb test/soap/wsdlDriver/test_calc.rb: + suppress deliberate warnings with $VERBOSE = nil. + Tue Sep 20 21:26:23 2005 Nobuyoshi Nakada * ext/io/wait/lib/nonblock.rb: disable on platforms non-blocking flag diff --git a/test/soap/wsdlDriver/test_calc.rb b/test/soap/wsdlDriver/test_calc.rb index f1cc116a59..d031f663a3 100644 --- a/test/soap/wsdlDriver/test_calc.rb +++ b/test/soap/wsdlDriver/test_calc.rb @@ -74,7 +74,9 @@ class TestCalc < Test::Unit::TestCase end def test_old_driver - @client = ::SOAP::WSDLDriverFactory.new(@wsdl).create_driver + silent do + @client = ::SOAP::WSDLDriverFactory.new(@wsdl).create_driver + end @client.wiredump_dev = STDOUT if $DEBUG @client.endpoint_url = "http://localhost:#{Port}/" @client.generate_explicit_type = true @@ -82,6 +84,16 @@ class TestCalc < Test::Unit::TestCase @client.generate_explicit_type = false assert_equal(0.3, @client.add(0.1, 0.2)) end + + def silent + back = $VERBOSE + $VERBOSE = nil + begin + yield + ensure + $VERBOSE = back + end + end end diff --git a/test/wsdl/any/test_any.rb b/test/wsdl/any/test_any.rb index 7b0e480be9..aab5eb631f 100644 --- a/test/wsdl/any/test_any.rb +++ b/test/wsdl/any/test_any.rb @@ -21,7 +21,9 @@ class TestAny < Test::Unit::TestCase gen.opt['servant_skelton'] = nil gen.opt['standalone_server_stub'] = nil gen.opt['force'] = true - gen.run + suppress_warning do + gen.run + end compare("expectedDriver.rb", "echoDriver.rb") compare("expectedEcho.rb", "echo.rb") compare("expectedService.rb", "echo_service.rb") @@ -40,6 +42,16 @@ class TestAny < Test::Unit::TestCase def loadfile(file) File.open(pathname(file)) { |f| f.read } end + + def suppress_warning + back = $VERBOSE + $VERBOSE = nil + begin + yield + ensure + $VERBOSE = back + end + end end diff --git a/test/wsdl/ref/test_ref.rb b/test/wsdl/ref/test_ref.rb index 165a8643e9..9e29fa31e0 100644 --- a/test/wsdl/ref/test_ref.rb +++ b/test/wsdl/ref/test_ref.rb @@ -19,7 +19,9 @@ class TestRef < Test::Unit::TestCase gen.logger.level = Logger::FATAL gen.opt['classdef'] = nil gen.opt['force'] = true - gen.run + suppress_warning do + gen.run + end compare("expectedProduct.rb", "product.rb") File.unlink(pathname('product.rb')) end @@ -35,6 +37,16 @@ class TestRef < Test::Unit::TestCase def pathname(filename) File.join(DIR, filename) end + + def suppress_warning + back = $VERBOSE + $VERBOSE = nil + begin + yield + ensure + $VERBOSE = back + end + end end diff --git a/test/wsdl/simpletype/rpc/test_rpc.rb b/test/wsdl/simpletype/rpc/test_rpc.rb index 1d6a3eb4bc..fdd55552d0 100644 --- a/test/wsdl/simpletype/rpc/test_rpc.rb +++ b/test/wsdl/simpletype/rpc/test_rpc.rb @@ -23,7 +23,9 @@ class TestRPC < Test::Unit::TestCase gen.opt['servant_skelton'] = nil gen.opt['standalone_server_stub'] = nil gen.opt['force'] = true - gen.run + suppress_warning do + gen.run + end compare("expectedEchoVersion.rb", "echo_version.rb") compare("expectedDriver.rb", "echo_versionDriver.rb") compare("expectedService.rb", "echo_version_service.rb") @@ -44,6 +46,16 @@ class TestRPC < Test::Unit::TestCase def loadfile(file) File.open(pathname(file)) { |f| f.read } end + + def suppress_warning + back = $VERBOSE + $VERBOSE = nil + begin + yield + ensure + $VERBOSE = back + end + end end