1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* {ext,lib,test}/**/*.rb: removed trailing spaces.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@27366 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2010-04-16 21:51:01 +00:00
parent c89882197e
commit 75c1cac7f3
442 changed files with 4654 additions and 4654 deletions

View file

@ -67,10 +67,10 @@ class Test_DateTime < Test::Unit::TestCase
def test_set_exception
dt = createDateTime()
assert_raises(ArgumentError) { dt.year = 4.5 }
assert_nothing_raised(ArgumentError) { dt.year = -2000 }
assert_raises(ArgumentError) { dt.month = 0 }
assert_raises(ArgumentError) { dt.month = 13 }
assert_nothing_raised(ArgumentError) { dt.month = 7 }
@ -99,7 +99,7 @@ class Test_DateTime < Test::Unit::TestCase
def test_to_a
y, m, d, h, mi, s = 1970, 3, 24, 12, 0, 5
dt = XMLRPC::DateTime.new(y, m, d, h, mi, s)
a = dt.to_a
a = dt.to_a
assert_instance_of(Array, a)
assert_equal(6, a.size, "Returned array has wrong size")
@ -115,8 +115,8 @@ class Test_DateTime < Test::Unit::TestCase
def test_to_time1
y, m, d, h, mi, s = 1970, 3, 24, 12, 0, 5
dt = XMLRPC::DateTime.new(y, m, d, h, mi, s)
time = dt.to_time
time = dt.to_time
assert_not_nil(time)
assert_equal(y, time.year)
@ -130,15 +130,15 @@ class Test_DateTime < Test::Unit::TestCase
def test_to_time2
dt = createDateTime()
dt.year = 1969
assert_nil(dt.to_time)
end
def test_to_date1
y, m, d, h, mi, s = 1970, 3, 24, 12, 0, 5
dt = XMLRPC::DateTime.new(y, m, d, h, mi, s)
date = dt.to_date
date = dt.to_date
assert_equal(y, date.year)
assert_equal(m, date.month)
assert_equal(d, date.day)
@ -147,7 +147,7 @@ class Test_DateTime < Test::Unit::TestCase
def test_to_date2
dt = createDateTime()
dt.year = 666
assert_equal(666, dt.to_date.year)
end

View file

@ -29,7 +29,7 @@ class Test_Features < Test::Unit::TestCase
XMLRPC::XMLWriter.each_installed_writer do |writer|
c = XMLRPC::Create.new(writer)
str = c.methodCall("test", *@params)
str = c.methodCall("test", *@params)
XMLRPC::XMLParser.each_installed_parser do |parser|
para = nil

View file

@ -42,7 +42,7 @@ class Test_Marshal < Test::Unit::TestCase
end
def test_parser_values
v1 = [
v1 = [
1, -7778, # integers
1.0, 0.0, -333.0, 2343434343.0, # floats
false, true, true, false, # booleans
@ -72,9 +72,9 @@ class Test_Marshal < Test::Unit::TestCase
assert_equal( v3_exp, m.load_response(m.dump_response(v3)) )
pers = m.load_response(m.dump_response(person))
assert( pers.is_a?(Person) )
assert( person.name == pers.name )
assert( person.name == pers.name )
end
# missing, Date, Time, DateTime

View file

@ -7,16 +7,16 @@ module GenericParserTest
def datafile(base)
File.join(File.dirname(__FILE__), "data", base)
end
def load_data(name)
[File.read(datafile(name) + ".xml"), YAML.load(File.read(datafile(name) + ".expected"))]
end
def setup
@xml1, @expected1 = load_data('xml1')
@xml2, @expected2 = load_data('bug_covert')
@xml3, @expected3 = load_data('bug_bool')
@xml4, @expected4 = load_data('value')
@xml2, @expected2 = load_data('bug_covert')
@xml3, @expected3 = load_data('bug_bool')
@xml4, @expected4 = load_data('value')
@cdata_xml, @cdata_expected = load_data('bug_cdata')
@ -27,7 +27,7 @@ module GenericParserTest
end
# test parseMethodResponse --------------------------------------------------
def test_parseMethodResponse1
assert_equal(@expected1, @p.parseMethodResponse(@xml1))
end
@ -67,7 +67,7 @@ module GenericParserTest
end
end
# create test class for each installed parser
# create test class for each installed parser
XMLRPC::XMLParser.each_installed_parser do |parser|
klass = parser.class
name = klass.to_s.split("::").last

View file

@ -18,9 +18,9 @@ class Test_Webrick < Test::Unit::TestCase
if b == 0
raise XMLRPC::FaultException.new(1, "division by zero")
else
a / b
a / b
end
end
end
s.set_default_handler do |name, *args|
raise XMLRPC::FaultException.new(-99, "Method #{name} missing" +
@ -34,13 +34,13 @@ class Test_Webrick < Test::Unit::TestCase
def setup_http_server(port, use_ssl)
option = {
:Port => port,
:Port => port,
:SSLEnable => use_ssl,
}
if use_ssl
require 'webrick/https'
option.update(
:SSLVerifyClient => ::OpenSSL::SSL::VERIFY_NONE,
:SSLVerifyClient => ::OpenSSL::SSL::VERIFY_NONE,
:SSLCertName => []
)
end

View file

@ -5,19 +5,19 @@ module WEBrick_Testing
def initialize() super(self) end
def <<(*args) end
end
def start_server(config={})
raise "already started" if @__server
@__started = false
Thread.new {
@__server = WEBrick::HTTPServer.new(
{
{
:Logger => DummyLog.new,
:AccessLog => [],
:StartCallback => proc { @__started = true }
}.update(config))
yield @__server
yield @__server
@__server.start
@__started = false
}