From 1951ceeed731938663b85939b7b9c7002ad4e34b Mon Sep 17 00:00:00 2001 From: mame Date: Tue, 13 May 2008 15:57:22 +0000 Subject: * 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 --- ChangeLog | 18 ++++++++++++++++++ test/ruby/test_array.rb | 2 +- test/ruby/test_env.rb | 2 +- test/ruby/test_file_exhaustive.rb | 2 +- test/ruby/test_fixnum.rb | 2 +- test/ruby/test_hash.rb | 2 +- test/ruby/test_io_m17n.rb | 9 --------- test/ruby/test_rational.rb | 2 +- test/ruby/test_utf16.rb | 2 +- 9 files changed, 25 insertions(+), 16 deletions(-) diff --git a/ChangeLog b/ChangeLog index d5d05f32d1..48bb852c45 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,21 @@ +Wed May 14 00:55:56 2008 Yusuke Endoh + + * 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 * eval_method.c (rb_add_method): fix check for warning when diff --git a/test/ruby/test_array.rb b/test/ruby/test_array.rb index 2ed15ffec0..3775c1f54e 100644 --- a/test/ruby/test_array.rb +++ b/test/ruby/test_array.rb @@ -1401,7 +1401,7 @@ class TestArray < Test::Unit::TestCase assert_equal("[...]", a.join) end - def test_to_a + def test_to_a2 klass = Class.new(Array) a = klass.new.to_a assert_equal([], a) diff --git a/test/ruby/test_env.rb b/test/ruby/test_env.rb index adb3e4127c..28f0e87b59 100644 --- a/test/ruby/test_env.rb +++ b/test/ruby/test_env.rb @@ -266,7 +266,7 @@ class TestEnv < Test::Unit::TestCase assert_raise(ArgumentError) { ENV.assoc("foo\0bar") } end - def test_has_value + def test_has_value2 ENV.clear assert(!ENV.has_value?("foo")) ENV["test"] = "foo" diff --git a/test/ruby/test_file_exhaustive.rb b/test/ruby/test_file_exhaustive.rb index 310f694ee4..958cddfc4b 100644 --- a/test/ruby/test_file_exhaustive.rb +++ b/test/ruby/test_file_exhaustive.rb @@ -339,7 +339,7 @@ class TestFileExhaustive < Test::Unit::TestCase assert_raise(Errno::EEXIST) { File.link(@file, @file) } end - def test_symlink + def test_symlink2 return unless @symlinkfile assert_equal(@file, File.readlink(@symlinkfile)) assert_raise(Errno::EINVAL) { File.readlink(@file) } diff --git a/test/ruby/test_fixnum.rb b/test/ruby/test_fixnum.rb index 43737d60b0..8fa751ba98 100644 --- a/test/ruby/test_fixnum.rb +++ b/test/ruby/test_fixnum.rb @@ -134,7 +134,7 @@ class TestFixnum < Test::Unit::TestCase assert_raise(ArgumentError) { 10.to_s(1) } end - def test_plus + def test_plus2 assert_equal(2, 1 + 1) assert_equal(4294967297, 1 + 2**32) assert_equal(2.0, 1 + 1.0) diff --git a/test/ruby/test_hash.rb b/test/ruby/test_hash.rb index 4c4dea84b7..c3acf14e3c 100644 --- a/test/ruby/test_hash.rb +++ b/test/ruby/test_hash.rb @@ -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 }) end - def test_clear + def test_clear2 assert_equal({}, {1=>2,3=>4,5=>6}.clear) h = {1=>2,3=>4,5=>6} h.each { h.clear } diff --git a/test/ruby/test_io_m17n.rb b/test/ruby/test_io_m17n.rb index e007712db5..585e5aeadd 100644 --- a/test/ruby/test_io_m17n.rb +++ b/test/ruby/test_io_m17n.rb @@ -120,15 +120,6 @@ EOT } 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 assert_equal(Encoding.default_external, STDIN.external_encoding) assert_equal(nil, STDIN.internal_encoding) diff --git a/test/ruby/test_rational.rb b/test/ruby/test_rational.rb index a40d6c6d76..0a72fa12ad 100644 --- a/test/ruby/test_rational.rb +++ b/test/ruby/test_rational.rb @@ -951,7 +951,7 @@ class Rational_Test < Test::Unit::TestCase assert_equal(0, Rational(0, 2**100)) end - def test_unify + def test_unify2 f = defined?(Rational::Unify) Rational.const_set(:Unify, true) unless f diff --git a/test/ruby/test_utf16.rb b/test/ruby/test_utf16.rb index 358ae0bf10..74df84af6e 100644 --- a/test/ruby/test_utf16.rb +++ b/test/ruby/test_utf16.rb @@ -281,7 +281,7 @@ EOT assert_str_equal("cd".encode("utf-16be"), r[1]) end - def test_count + def test_count2 e = "abc".count("^b") assert_equal(e, "abc".encode("utf-16be").count("^b".encode("utf-16be"))) assert_equal(e, "abc".encode("utf-16le").count("^b".encode("utf-16le"))) -- cgit v1.2.3