* test/ruby/test_io_m17n.rb: remove a duplicative method.
* test/ruby/test_utf16.rb: rename a conflicting method name. * test/ruby/test_array.rb: ditto. * test/ruby/test_file_exhaustive.rb: ditto. * test/ruby/test_hash.rb: ditto. * test/ruby/test_env.rb: ditto. * test/ruby/test_fixnum.rb: ditto. * test/ruby/test_rational.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16406 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
4bb3fa6982
commit
1951ceeed7
18
ChangeLog
18
ChangeLog
@ -1,3 +1,21 @@
|
|||||||
|
Wed May 14 00:55:56 2008 Yusuke Endoh <mame@tsg.ne.jp>
|
||||||
|
|
||||||
|
* test/ruby/test_io_m17n.rb: remove a duplicative method.
|
||||||
|
|
||||||
|
* test/ruby/test_utf16.rb: rename a conflicting method name.
|
||||||
|
|
||||||
|
* test/ruby/test_array.rb: ditto.
|
||||||
|
|
||||||
|
* test/ruby/test_file_exhaustive.rb: ditto.
|
||||||
|
|
||||||
|
* test/ruby/test_hash.rb: ditto.
|
||||||
|
|
||||||
|
* test/ruby/test_env.rb: ditto.
|
||||||
|
|
||||||
|
* test/ruby/test_fixnum.rb: ditto.
|
||||||
|
|
||||||
|
* test/ruby/test_rational.rb: ditto.
|
||||||
|
|
||||||
Wed May 14 00:45:58 2008 Yusuke Endoh <mame@tsg.ne.jp>
|
Wed May 14 00:45:58 2008 Yusuke Endoh <mame@tsg.ne.jp>
|
||||||
|
|
||||||
* eval_method.c (rb_add_method): fix check for warning when
|
* eval_method.c (rb_add_method): fix check for warning when
|
||||||
|
@ -1401,7 +1401,7 @@ class TestArray < Test::Unit::TestCase
|
|||||||
assert_equal("[...]", a.join)
|
assert_equal("[...]", a.join)
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_to_a
|
def test_to_a2
|
||||||
klass = Class.new(Array)
|
klass = Class.new(Array)
|
||||||
a = klass.new.to_a
|
a = klass.new.to_a
|
||||||
assert_equal([], a)
|
assert_equal([], a)
|
||||||
|
@ -266,7 +266,7 @@ class TestEnv < Test::Unit::TestCase
|
|||||||
assert_raise(ArgumentError) { ENV.assoc("foo\0bar") }
|
assert_raise(ArgumentError) { ENV.assoc("foo\0bar") }
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_has_value
|
def test_has_value2
|
||||||
ENV.clear
|
ENV.clear
|
||||||
assert(!ENV.has_value?("foo"))
|
assert(!ENV.has_value?("foo"))
|
||||||
ENV["test"] = "foo"
|
ENV["test"] = "foo"
|
||||||
|
@ -339,7 +339,7 @@ class TestFileExhaustive < Test::Unit::TestCase
|
|||||||
assert_raise(Errno::EEXIST) { File.link(@file, @file) }
|
assert_raise(Errno::EEXIST) { File.link(@file, @file) }
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_symlink
|
def test_symlink2
|
||||||
return unless @symlinkfile
|
return unless @symlinkfile
|
||||||
assert_equal(@file, File.readlink(@symlinkfile))
|
assert_equal(@file, File.readlink(@symlinkfile))
|
||||||
assert_raise(Errno::EINVAL) { File.readlink(@file) }
|
assert_raise(Errno::EINVAL) { File.readlink(@file) }
|
||||||
|
@ -134,7 +134,7 @@ class TestFixnum < Test::Unit::TestCase
|
|||||||
assert_raise(ArgumentError) { 10.to_s(1) }
|
assert_raise(ArgumentError) { 10.to_s(1) }
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_plus
|
def test_plus2
|
||||||
assert_equal(2, 1 + 1)
|
assert_equal(2, 1 + 1)
|
||||||
assert_equal(4294967297, 1 + 2**32)
|
assert_equal(4294967297, 1 + 2**32)
|
||||||
assert_equal(2.0, 1 + 1.0)
|
assert_equal(2.0, 1 + 1.0)
|
||||||
|
@ -721,7 +721,7 @@ class TestHash < Test::Unit::TestCase
|
|||||||
assert_equal({3=>4,5=>6}, {1=>2,3=>4,5=>6}.select {|k, v| k + v >= 7 })
|
assert_equal({3=>4,5=>6}, {1=>2,3=>4,5=>6}.select {|k, v| k + v >= 7 })
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_clear
|
def test_clear2
|
||||||
assert_equal({}, {1=>2,3=>4,5=>6}.clear)
|
assert_equal({}, {1=>2,3=>4,5=>6}.clear)
|
||||||
h = {1=>2,3=>4,5=>6}
|
h = {1=>2,3=>4,5=>6}
|
||||||
h.each { h.clear }
|
h.each { h.clear }
|
||||||
|
@ -120,15 +120,6 @@ EOT
|
|||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_open_w_enc
|
|
||||||
with_tmpdir {
|
|
||||||
open("tmp", "w:euc-jp") {|f|
|
|
||||||
assert_equal(Encoding::EUC_JP, f.external_encoding)
|
|
||||||
assert_equal(nil, f.internal_encoding)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
end
|
|
||||||
|
|
||||||
def test_stdin
|
def test_stdin
|
||||||
assert_equal(Encoding.default_external, STDIN.external_encoding)
|
assert_equal(Encoding.default_external, STDIN.external_encoding)
|
||||||
assert_equal(nil, STDIN.internal_encoding)
|
assert_equal(nil, STDIN.internal_encoding)
|
||||||
|
@ -951,7 +951,7 @@ class Rational_Test < Test::Unit::TestCase
|
|||||||
assert_equal(0, Rational(0, 2**100))
|
assert_equal(0, Rational(0, 2**100))
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_unify
|
def test_unify2
|
||||||
f = defined?(Rational::Unify)
|
f = defined?(Rational::Unify)
|
||||||
Rational.const_set(:Unify, true) unless f
|
Rational.const_set(:Unify, true) unless f
|
||||||
|
|
||||||
|
@ -281,7 +281,7 @@ EOT
|
|||||||
assert_str_equal("cd".encode("utf-16be"), r[1])
|
assert_str_equal("cd".encode("utf-16be"), r[1])
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_count
|
def test_count2
|
||||||
e = "abc".count("^b")
|
e = "abc".count("^b")
|
||||||
assert_equal(e, "abc".encode("utf-16be").count("^b".encode("utf-16be")))
|
assert_equal(e, "abc".encode("utf-16be").count("^b".encode("utf-16be")))
|
||||||
assert_equal(e, "abc".encode("utf-16le").count("^b".encode("utf-16le")))
|
assert_equal(e, "abc".encode("utf-16le").count("^b".encode("utf-16le")))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user