ruby-changes:2467
From: ko1@a...
Date: 18 Nov 2007 16:19:13 +0900
Subject: [ruby-changes:2467] akr - Ruby:r13958 (trunk): use ML ref. for assertion message.
akr 2007-11-18 16:18:56 +0900 (Sun, 18 Nov 2007) New Revision: 13958 Modified files: trunk/test/fileutils/test_fileutils.rb trunk/test/io/nonblock/test_flush.rb trunk/test/ruby/test_beginendblock.rb trunk/test/ruby/test_bignum.rb trunk/test/ruby/test_eval.rb trunk/test/ruby/test_file.rb trunk/test/ruby/test_fnmatch.rb trunk/test/ruby/test_integer.rb trunk/test/ruby/test_io.rb trunk/test/ruby/test_path.rb trunk/test/ruby/test_proc.rb trunk/test/ruby/test_sprintf.rb trunk/test/ruby/test_super.rb trunk/test/ruby/test_system.rb trunk/test/ruby/test_time.rb trunk/test/socket/test_socket.rb trunk/test/socket/test_tcp.rb trunk/test/socket/test_udp.rb trunk/test/stringio/test_stringio.rb trunk/test/uri/test_common.rb trunk/test/uri/test_generic.rb trunk/test/zlib/test_zlib.rb Log: use ML ref. for assertion message. http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/test/ruby/test_super.rb?r1=13958&r2=13957 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/test/ruby/test_beginendblock.rb?r1=13958&r2=13957 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/test/zlib/test_zlib.rb?r1=13958&r2=13957 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/test/ruby/test_io.rb?r1=13958&r2=13957 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/test/ruby/test_file.rb?r1=13958&r2=13957 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/test/ruby/test_bignum.rb?r1=13958&r2=13957 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/test/socket/test_socket.rb?r1=13958&r2=13957 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/test/io/nonblock/test_flush.rb?r1=13958&r2=13957 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/test/ruby/test_system.rb?r1=13958&r2=13957 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/test/ruby/test_proc.rb?r1=13958&r2=13957 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/test/uri/test_common.rb?r1=13958&r2=13957 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/test/stringio/test_stringio.rb?r1=13958&r2=13957 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/test/socket/test_udp.rb?r1=13958&r2=13957 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/test/ruby/test_time.rb?r1=13958&r2=13957 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/test/ruby/test_sprintf.rb?r1=13958&r2=13957 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/test/uri/test_generic.rb?r1=13958&r2=13957 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/test/ruby/test_integer.rb?r1=13958&r2=13957 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/test/ruby/test_eval.rb?r1=13958&r2=13957 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/test/fileutils/test_fileutils.rb?r1=13958&r2=13957 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/test/socket/test_tcp.rb?r1=13958&r2=13957 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/test/ruby/test_path.rb?r1=13958&r2=13957 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/test/ruby/test_fnmatch.rb?r1=13958&r2=13957 Index: test/ruby/test_fnmatch.rb =================================================================== --- test/ruby/test_fnmatch.rb (revision 13957) +++ test/ruby/test_fnmatch.rb (revision 13958) @@ -10,9 +10,8 @@ end end def test_fnmatch - # from [ruby-dev:22815] and [ruby-dev:22819] - assert(File.fnmatch('\[1\]' , '[1]')) - assert(File.fnmatch('*?', 'a')) + assert(File.fnmatch('\[1\]' , '[1]'), "[ruby-dev:22819]") + assert(File.fnmatch('*?', 'a'), "[ruby-dev:22815]") assert(File.fnmatch('*/', 'a/')) assert(File.fnmatch('\[1\]' , '[1]', File::FNM_PATHNAME)) assert(File.fnmatch('*?', 'a', File::FNM_PATHNAME)) Index: test/ruby/test_system.rb =================================================================== --- test/ruby/test_system.rb (revision 13957) +++ test/ruby/test_system.rb (revision 13958) @@ -69,7 +69,7 @@ end end - def test_empty_evstr # [ruby-dev:25113] - assert_equal("", eval('"#{}"', nil, __FILE__, __LINE__)) + def test_empty_evstr + assert_equal("", eval('"#{}"', nil, __FILE__, __LINE__), "[ruby-dev:25113]") end end Index: test/ruby/test_bignum.rb =================================================================== --- test/ruby/test_bignum.rb (revision 13957) +++ test/ruby/test_bignum.rb (revision 13958) @@ -85,13 +85,13 @@ shift_test(-0xfffffffffffffffff) end - def test_to_s # [ruby-core:10686] - assert_equal("fvvvvvvvvvvvv" ,18446744073709551615.to_s(32)) - assert_equal("g000000000000" ,18446744073709551616.to_s(32)) - assert_equal("3w5e11264sgsf" ,18446744073709551615.to_s(36)) - assert_equal("3w5e11264sgsg" ,18446744073709551616.to_s(36)) - assert_equal("nd075ib45k86f" ,18446744073709551615.to_s(31)) - assert_equal("nd075ib45k86g" ,18446744073709551616.to_s(31)) + def test_to_s + assert_equal("fvvvvvvvvvvvv" ,18446744073709551615.to_s(32), "[ruby-core:10686]") + assert_equal("g000000000000" ,18446744073709551616.to_s(32), "[ruby-core:10686]") + assert_equal("3w5e11264sgsf" ,18446744073709551615.to_s(36), "[ruby-core:10686]") + assert_equal("3w5e11264sgsg" ,18446744073709551616.to_s(36), "[ruby-core:10686]") + assert_equal("nd075ib45k86f" ,18446744073709551615.to_s(31), "[ruby-core:10686]") + assert_equal("nd075ib45k86g" ,18446744073709551616.to_s(31), "[ruby-core:10686]") assert_equal("1777777777777777777777" ,18446744073709551615.to_s(8)) assert_equal("-1777777777777777777777" ,-18446744073709551615.to_s(8)) end Index: test/ruby/test_sprintf.rb =================================================================== --- test/ruby/test_sprintf.rb (revision 13957) +++ test/ruby/test_sprintf.rb (revision 13958) @@ -144,35 +144,30 @@ end def test_invalid - # [ruby-core:11569] - # Star precision before star width: - assert_raise(ArgumentError) {sprintf("%.**d", 5, 10, 1)} + assert_raise(ArgumentError, "[ruby-core:11569]") {sprintf("%.**d", 5, 10, 1)} # Precision before flags and width: - assert_raise(ArgumentError) {sprintf("%.5+05d", 5)} - assert_raise(ArgumentError) {sprintf("%.5 5d", 5)} + assert_raise(ArgumentError, "[ruby-core:11569]") {sprintf("%.5+05d", 5)} + assert_raise(ArgumentError, "[ruby-core:11569]") {sprintf("%.5 5d", 5)} # Overriding a star width with a numeric one: - assert_raise(ArgumentError) {sprintf("%*1s", 5, 1)} + assert_raise(ArgumentError, "[ruby-core:11569]") {sprintf("%*1s", 5, 1)} # Width before flags: - assert_raise(ArgumentError) {sprintf("%5+0d", 1)} - assert_raise(ArgumentError) {sprintf("%5 0d", 1)} + assert_raise(ArgumentError, "[ruby-core:11569]") {sprintf("%5+0d", 1)} + assert_raise(ArgumentError, "[ruby-core:11569]") {sprintf("%5 0d", 1)} # Specifying width multiple times: - assert_raise(ArgumentError) {sprintf("%50+30+20+10+5d", 5)} - assert_raise(ArgumentError) {sprintf("%50 30 20 10 5d", 5)} + assert_raise(ArgumentError, "[ruby-core:11569]") {sprintf("%50+30+20+10+5d", 5)} + assert_raise(ArgumentError, "[ruby-core:11569]") {sprintf("%50 30 20 10 5d", 5)} - # [ruby-core:11570] # Specifying the precision multiple times with negative star arguments: - assert_raise(ArgumentError) {sprintf("%.*.*.*.*f", -1, -1, -1, 5, 1)} + assert_raise(ArgumentError, "[ruby-core:11570]") {sprintf("%.*.*.*.*f", -1, -1, -1, 5, 1)} - # [ruby-core:11571] # Null bytes after percent signs are removed: - assert_equal("%\0x hello", sprintf("%\0x hello")) + assert_equal("%\0x hello", sprintf("%\0x hello"), "[ruby-core:11571]") - # [ruby-core:11573] - assert_raise(ArgumentError) {sprintf("%.25555555555555555555555555555555555555s", "hello")} + assert_raise(ArgumentError, "[ruby-core:11573]") {sprintf("%.25555555555555555555555555555555555555s", "hello")} end end Index: test/ruby/test_beginendblock.rb =================================================================== --- test/ruby/test_beginendblock.rb (revision 13957) +++ test/ruby/test_beginendblock.rb (revision 13958) @@ -54,15 +54,14 @@ end def test_raise_in_at_exit - # [ruby-core:09675] ruby = EnvUtil.rubybin out = IO.popen([ruby, '-e', 'STDERR.reopen(STDOUT)', '-e', 'at_exit{raise %[SomethingBad]}', '-e', 'raise %[SomethingElse]']) {|f| f.read } - assert_match /SomethingBad/, out - assert_match /SomethingElse/, out + assert_match /SomethingBad/, out, "[ruby-core:9675]" + assert_match /SomethingElse/, out, "[ruby-core:9675]" end def test_should_propagate_exit_code Index: test/ruby/test_integer.rb =================================================================== --- test/ruby/test_integer.rb (revision 13957) +++ test/ruby/test_integer.rb (revision 13958) @@ -156,12 +156,11 @@ } } - # [ruby-dev:31271] - # assert_equal(1, (1 << 0x40000000)[0x40000000]) - # assert_equal(0, (-1 << 0x40000001)[0x40000000]) + # assert_equal(1, (1 << 0x40000000)[0x40000000], "[ruby-dev:31271]") + # assert_equal(0, (-1 << 0x40000001)[0x40000000], "[ruby-dev:31271]") big_zero = 0x40000000.coerce(0)[0] - assert_equal(0, (-0x40000002)[big_zero]) - assert_equal(1, 0x400000001[big_zero]) + assert_equal(0, (-0x40000002)[big_zero], "[ruby-dev:31271]") + assert_equal(1, 0x400000001[big_zero], "[ruby-dev:31271]") end def test_plus Index: test/ruby/test_proc.rb =================================================================== --- test/ruby/test_proc.rb (revision 13957) +++ test/ruby/test_proc.rb (revision 13958) @@ -70,25 +70,21 @@ assert_arity(-1) {|*|} end - # [ruby-dev:22592] def m(x) lambda { x } end def test_eq - # [ruby-dev:22592] a = m(1) b = m(2) - assert_not_equal(a, b) - assert_not_equal(a.call, b.call) + assert_not_equal(a, b, "[ruby-dev:22592]") + assert_not_equal(a.call, b.call, "[ruby-dev:22592]") - # [ruby-dev:22599] - assert_not_equal(proc {||}, proc {|x,y|}) + assert_not_equal(proc {||}, proc {|x,y|}, "[ruby-dev:22599]") - # [ruby-dev:22601] a = lambda {|x| lambda {} }.call(1) b = lambda {} - assert_not_equal(a, b) + assert_not_equal(a, b, "[ruby-dev:22601]") end def test_block_par Index: test/ruby/test_file.rb =================================================================== --- test/ruby/test_file.rb (revision 13957) +++ test/ruby/test_file.rb (revision 13958) @@ -37,16 +37,16 @@ include TestEOF::Seek - def test_truncate_wbuf # [ruby-dev:24191] + def test_truncate_wbuf f = Tempfile.new("test-truncate") f.print "abc" f.truncate(0) f.print "def" f.close - assert_equal("\0\0\0def", File.read(f.path)) + assert_equal("\0\0\0def", File.read(f.path), "[ruby-dev:24191]") end - def test_truncate_rbuf # [ruby-dev:24197] + def test_truncate_rbuf f = Tempfile.new("test-truncate") f.puts "abc" f.puts "def" @@ -54,7 +54,7 @@ f.open assert_equal("abc\n", f.gets) f.truncate(3) - assert_equal(nil, f.gets) + assert_equal(nil, f.gets, "[ruby-dev:24197]") end def test_truncate_beyond_eof @@ -110,8 +110,7 @@ assert_nothing_raised { File.open(__FILE__) {|f| f.chown -1, -1 } } - # [ruby-dev:27140] - assert_nothing_raised { + assert_nothing_raised("[ruby-dev:27140]") { File.open(__FILE__) {|f| f.chown nil, nil } } end Index: test/ruby/test_eval.rb =================================================================== --- test/ruby/test_eval.rb (revision 13957) +++ test/ruby/test_eval.rb (revision 13958) @@ -338,30 +338,30 @@ end end - def test_nil_instance_eval_cvar # [ruby-dev:24103] + def test_nil_instance_eval_cvar def nil.test_binding binding end bb = eval("nil.instance_eval \"binding\"", nil.test_binding) - assert_raise(NameError) { eval("@@a", bb) } + assert_raise(NameError, "[ruby-dev:24103]") { eval("@@a", bb) } class << nil remove_method :test_binding end end - def test_fixnum_instance_eval_cvar # [ruby-dev:24213] - assert_raise(NameError) { 1.instance_eval "@@a" } + def test_fixnum_instance_eval_cvar + assert_raise(NameError, "[ruby-dev:24213]") { 1.instance_eval "@@a" } end - def test_cvar_scope_with_instance_eval # [ruby-dev:24223] + def test_cvar_scope_with_instance_eval Fixnum.class_eval "@@test_cvar_scope_with_instance_eval = 1" # depends on [ruby-dev:24229] @@test_cvar_scope_with_instance_eval = 4 - assert_equal(4, 1.instance_eval("@@test_cvar_scope_with_instance_eval")) + assert_equal(4, 1.instance_eval("@@test_cvar_scope_with_instance_eval"), "[ruby-dev:24223]") Fixnum.__send__(:remove_class_variable, :@@test_cvar_scope_with_instance_eval) end - def test_eval_and_define_method # [ruby-dev:24228] - assert_nothing_raised { + def test_eval_and_define_method + assert_nothing_raised("[ruby-dev:24228]") { def temporally_method_for_test_eval_and_define_method(&block) lambda { class << Object.new; self end.send(:define_method, :zzz, &block) Index: test/ruby/test_super.rb =================================================================== --- test/ruby/test_super.rb (revision 13957) +++ test/ruby/test_super.rb (revision 13958) @@ -126,9 +126,9 @@ end end - def test_define_method # [ruby-core:03856] + def test_define_method a = A.new a.uu(12) - assert_equal("A#tt", a.tt(12)) + assert_equal("A#tt", a.tt(12), "[ruby-core:3856]") end end Index: test/ruby/test_time.rb =================================================================== --- test/ruby/test_time.rb (revision 13957) +++ test/ruby/test_time.rb (revision 13958) @@ -63,11 +63,11 @@ end end - def test_huge_difference # [ruby-dev:22619] + def test_huge_difference if negative_time_t? - assert_equal(Time.at(-0x80000000), Time.at(0x7fffffff) - 0xffffffff) + assert_equal(Time.at(-0x80000000), Time.at(0x7fffffff) - 0xffffffff, "[ruby-dev:22619]") assert_equal(Time.at(-0x80000000), Time.at(0x7fffffff) + (-0xffffffff)) - assert_equal(Time.at(0x7fffffff), Time.at(-0x80000000) + 0xffffffff) + assert_equal(Time.at(0x7fffffff), Time.at(-0x80000000) + 0xffffffff, "[ruby-dev:22619]") assert_equal(Time.at(0x7fffffff), Time.at(-0x80000000) - (-0xffffffff)) end end Index: test/ruby/test_io.rb =================================================================== --- test/ruby/test_io.rb (revision 13957) +++ test/ruby/test_io.rb (revision 13958) @@ -19,18 +19,18 @@ assert_nil r.gets("") r.close - # "\377" [ruby-dev:24460] + # "\377" r, w = IO.pipe w.print "\377xyz" w.close assert_equal("\377", r.gets("\377"), "[ruby-dev:24460]") r.close - # "" [ruby-core:03771] + # "" r, w = IO.pipe w.print "a\n\nb\n\n" w.close - assert_equal "a\n\n", r.gets("") + assert_equal "a\n\n", r.gets(""), "[ruby-core:03771]" assert_equal "b\n\n", r.gets("") assert_nil r.gets("") r.close Index: test/ruby/test_path.rb =================================================================== --- test/ruby/test_path.rb (revision 13957) +++ test/ruby/test_path.rb (revision 13958) @@ -44,13 +44,13 @@ assert_equal("//sub", File.expand_path("sub", "//")) end - def test_dirname # [ruby-dev:27738] + def test_dirname if /(bcc|ms)win\d|mingw|cygwin|djgpp|human|emx/ =~ RUBY_PLATFORM # DOSISH_DRIVE_LETTER assert_equal('C:.', File.dirname('C:')) assert_equal('C:.', File.dirname('C:a')) assert_equal('C:.', File.dirname('C:a/')) - assert_equal('C:a', File.dirname('C:a/b')) + assert_equal('C:a', File.dirname('C:a/b'), "[ruby-dev:27738]") assert_equal('C:/', File.dirname('C:/')) assert_equal('C:/', File.dirname('C:/a')) @@ -62,7 +62,7 @@ assert_equal('C:/', File.dirname('C://a/')) assert_equal('C:/a', File.dirname('C://a/b')) - assert_equal('C:/', File.dirname('C:///')) + assert_equal('C:/', File.dirname('C:///'), "[ruby-dev:27738]") assert_equal('C:/', File.dirname('C:///a')) assert_equal('C:/', File.dirname('C:///a/')) assert_equal('C:/a', File.dirname('C:///a/b')) @@ -134,7 +134,7 @@ end end - def test_basename # [ruby-dev:27766] + def test_basename if /(bcc|ms)win\d|mingw|cygwin|djgpp|human|emx/ =~ RUBY_PLATFORM # DOSISH_DRIVE_LETTER assert_equal('', File.basename('C:')) @@ -194,7 +194,7 @@ assert_equal('/', File.basename('//')) assert_equal('/', File.basename('//a')) assert_equal('/', File.basename('//a/')) - assert_equal('/', File.basename('//a/b')) + assert_equal('/', File.basename('//a/b'), "[ruby-dev:27776]") assert_equal('/', File.basename('//a/b/')) assert_equal('c', File.basename('//a/b/c')) Index: test/uri/test_common.rb =================================================================== --- test/uri/test_common.rb (revision 13957) +++ test/uri/test_common.rb (revision 13958) @@ -12,7 +12,6 @@ end def test_extract - # ruby-list:36086 assert_equal(['http://example.com'], URI.extract('http://example.com')) assert_equal(['http://example.com'], @@ -20,9 +19,9 @@ assert_equal(['http://example.com/foo)'], URI.extract('(http://example.com/foo)')) assert_equal(['http://example.jphttp://example.jp'], - URI.extract('http://example.jphttp://example.jp')) + URI.extract('http://example.jphttp://example.jp'), "[ruby-list:36086]") assert_equal(['http://example.jphttp://example.jp'], - URI.extract('http://example.jphttp://example.jp', ['http'])) + URI.extract('http://example.jphttp://example.jp', ['http']), "[ruby-list:36086]") assert_equal(['http://', 'mailto:'].sort, URI.extract('ftp:// http:// mailto: https://', ['http', 'mailto']).sort) # reported by Doug Kearns <djkea2@m...> Index: test/uri/test_generic.rb =================================================================== --- test/uri/test_generic.rb (revision 13957) +++ test/uri/test_generic.rb (revision 13958) @@ -121,11 +121,10 @@ assert_kind_of(URI::Generic, url) # 9 - # [ruby-dev:25667] url = URI.parse('ftp://:pass@localhost/') - assert_equal('', url.user) + assert_equal('', url.user, "[ruby-dev:25667]") assert_equal('pass', url.password) - assert_equal(':pass', url.userinfo) + assert_equal(':pass', url.userinfo, "[ruby-dev:25667]") url = URI.parse('ftp://user@localhost/') assert_equal('user', url.user) assert_equal(nil, url.password) @@ -152,9 +151,8 @@ assert_equal(URI.parse('http://foo/baz'), u3 + '/baz') assert_equal(URI.parse('http://foo/baz'), u4 + '/baz') - # from [ruby-dev:11508] Re: uri url = URI.parse('http://hoge/a.html') + 'b.html' - assert_equal('http://hoge/b.html', url.to_s) + assert_equal('http://hoge/b.html', url.to_s, "[ruby-dev:11508]") # reported by Mr. Kubota <em6t-kbt@a...> url = URI.parse('http://a/b') + 'http://x/y' @@ -171,15 +169,13 @@ assert(nil != u.merge!("../baz")) assert_equal('http://foo/baz', u.to_s) - # [ruby-dev:23628] u0 = URI.parse('mailto:foo@e...') u1 = URI.parse('mailto:foo@e...#bar') - assert_equal(uri_to_ary(u0 + '#bar'), uri_to_ary(u1)) + assert_equal(uri_to_ary(u0 + '#bar'), uri_to_ary(u1), "[ruby-dev:23628]") - # [ruby-list:39838] u0 = URI.parse('http://www.example.com/') u1 = URI.parse('http://www.example.com/foo/..') + './' - assert_equal(u0, u1) + assert_equal(u0, u1, "[ruby-list:39838]") u0 = URI.parse('http://www.example.com/foo/') u1 = URI.parse('http://www.example.com/foo/bar/..') + './' assert_equal(u0, u1) @@ -193,11 +189,10 @@ u1 = URI.parse('http://www.example.com/foo/bar/baz/../..') + './' assert_equal(u0, u1) - # [ruby-list:39844] u = URI.parse('http://www.example.com/') u0 = u + './foo/' u1 = u + './foo/bar/..' - assert_equal(u0, u1) + assert_equal(u0, u1, "[ruby-list:39844]") u = URI.parse('http://www.example.com/') u0 = u + './' u1 = u + './foo/bar/../..' @@ -649,10 +644,9 @@ assert_equal(URI.parse('http://foo/hoge'), URI.join('http://foo', 'bar/baz', '/hoge')) end - # ruby-dev:16728 def test_set_component uri = URI.parse('http://foo:bar@baz') - assert_equal('oof', uri.user = 'oof') + assert_equal('oof', uri.user = 'oof', "[ruby-dev:16728]") assert_equal('http://oof:bar@baz', uri.to_s) assert_equal('rab', uri.password = 'rab') assert_equal('http://oof:rab@baz', uri.to_s) Index: test/fileutils/test_fileutils.rb =================================================================== --- test/fileutils/test_fileutils.rb (revision 13957) +++ test/fileutils/test_fileutils.rb (revision 13958) @@ -326,14 +326,13 @@ assert_same_file fname, 'tmp/mvdest' end - # [ruby-talk:124368] mkdir 'tmp/tmpdir' mkdir_p 'tmp/dest2/tmpdir' assert_raises(Errno::EEXIST) { mv 'tmp/tmpdir', 'tmp/dest2' } mkdir 'tmp/dest2/tmpdir/junk' - assert_raises(Errno::EEXIST) { + assert_raises(Errno::EEXIST, "[ruby-talk:124368]") { mv 'tmp/tmpdir', 'tmp/dest2' } Index: test/zlib/test_zlib.rb =================================================================== --- test/zlib/test_zlib.rb (revision 13957) +++ test/zlib/test_zlib.rb (revision 13958) @@ -14,7 +14,7 @@ assert_equal("", Zlib::GzipReader.new(StringIO.new(D0)).read(0)) end - def test_ungetc # [ruby-dev:24060] + def test_ungetc s = "" w = Zlib::GzipWriter.new(StringIO.new(s)) w << (1...1000).to_a.inspect @@ -22,14 +22,14 @@ r = Zlib::GzipReader.new(StringIO.new(s)) r.read(100) r.ungetc ?a - assert_nothing_raised { + assert_nothing_raised("[ruby-dev:24060]") { r.read(100) r.read r.close } end - def test_ungetc_paragraph # [ruby-dev:24065] + def test_ungetc_paragraph s = "" w = Zlib::GzipWriter.new(StringIO.new(s)) w << "abc" @@ -37,7 +37,7 @@ r = Zlib::GzipReader.new(StringIO.new(s)) r.ungetc ?\n assert_equal("abc", r.gets("")) - assert_nothing_raised { + assert_nothing_raised("[ruby-dev:24065]") { r.read r.close } @@ -46,12 +46,10 @@ class TestZlibGzipWriter < Test::Unit::TestCase def test_invalid_new - # [ruby-dev:23228] - assert_raise(NoMethodError) { Zlib::GzipWriter.new(nil).close } - # [ruby-dev:23344] - assert_raise(NoMethodError) { Zlib::GzipWriter.new(true).close } - assert_raise(NoMethodError) { Zlib::GzipWriter.new(0).close } - assert_raise(NoMethodError) { Zlib::GzipWriter.new(:hoge).close } + assert_raise(NoMethodError, "[ruby-dev:23228]") { Zlib::GzipWriter.new(nil).close } + assert_raise(NoMethodError, "[ruby-dev:23344]") { Zlib::GzipWriter.new(true).close } + assert_raise(NoMethodError, "[ruby-dev:23344]") { Zlib::GzipWriter.new(0).close } + assert_raise(NoMethodError, "[ruby-dev:23344]") { Zlib::GzipWriter.new(:hoge).close } end end end Index: test/socket/test_tcp.rb =================================================================== --- test/socket/test_tcp.rb (revision 13957) +++ test/socket/test_tcp.rb (revision 13958) @@ -6,7 +6,7 @@ class TestTCPSocket < Test::Unit::TestCase - def test_recvfrom # [ruby-dev:24705] + def test_recvfrom assert false, "TODO: doesn't work on mswin32/64" if /mswin/ =~ RUBY_PLATFORM c = s = nil svr = TCPServer.new("localhost", 0) @@ -20,7 +20,7 @@ } addr = svr.addr sock = TCPSocket.open(addr[2], addr[1]) - assert_raise(RuntimeError, SocketError) { + assert_raise(RuntimeError, SocketError, "[ruby-dev:24705]") { sock.recvfrom(0x10000) } ensure Index: test/socket/test_socket.rb =================================================================== --- test/socket/test_socket.rb (revision 13957) +++ test/socket/test_socket.rb (revision 13958) @@ -29,7 +29,7 @@ end end - def test_setsockopt # [ruby-dev:25039] + def test_setsockopt s = nil linger = [0, 0].pack("ii") @@ -42,7 +42,7 @@ s = sock assert_equal(0, s.setsockopt(Socket::SOL_SOCKET, Socket::SO_LINGER, linger)) - assert_raise(IOError) { + assert_raise(IOError, "[ruby-dev:25039]") { s.setsockopt(Socket::SOL_SOCKET, Socket::SO_LINGER, val) } end Index: test/socket/test_udp.rb =================================================================== --- test/socket/test_udp.rb (revision 13957) +++ test/socket/test_udp.rb (revision 13958) @@ -6,26 +6,26 @@ class TestUDPSocket < Test::Unit::TestCase - def test_connect # [ruby-dev:25045] + def test_connect s = UDPSocket.new host = Object.new class << host; self end.send(:define_method, :to_str) { s.close "127.0.0.1" } - assert_raise(IOError) { + assert_raise(IOError, "[ruby-dev:25045]") { s.connect(host, 1) } end - def test_bind # [ruby-dev:25057] + def test_bind s = UDPSocket.new host = Object.new class << host; self end.send(:define_method, :to_str) { s.close "127.0.0.1" } - assert_raise(IOError) { + assert_raise(IOError, "[ruby-dev:25057]") { s.bind(host, 2000) } end Index: test/stringio/test_stringio.rb =================================================================== --- test/stringio/test_stringio.rb (revision 13957) +++ test/stringio/test_stringio.rb (revision 13958) @@ -15,29 +15,29 @@ include TestEOF::Seek - def test_truncate # [ruby-dev:24190] + def test_truncate io = StringIO.new("") io.puts "abc" io.truncate(0) io.puts "def" - assert_equal("\0\0\0\0def\n", io.string) + assert_equal("\0\0\0\0def\n", io.string, "[ruby-dev:24190]") end - def test_seek_beyond_eof # [ruby-dev:24194] + def test_seek_beyond_eof io = StringIO.new n = 100 io.seek(n) io.print "last" - assert_equal("\0" * n + "last", io.string) + assert_equal("\0" * n + "last", io.string, "[ruby-dev:24194]") end - def test_overwrite # [ruby-core:03836] + def test_overwrite stringio = StringIO.new responses = ['', 'just another ruby', 'hacker'] responses.each do |resp| stringio.puts(resp) stringio.rewind end - assert_equal("hacker\nother ruby\n", stringio.string) + assert_equal("hacker\nother ruby\n", stringio.string, "[ruby-core:3836]") end end Index: test/io/nonblock/test_flush.rb =================================================================== --- test/io/nonblock/test_flush.rb (revision 13957) +++ test/io/nonblock/test_flush.rb (revision 13958) @@ -6,7 +6,7 @@ Thread.abort_on_exception = true class TestIONonblock < Test::Unit::TestCase - def test_flush # [ruby-dev:24985] + def test_flush flunk "IO#close can't interrupt IO blocking on YARV" r,w = IO.pipe w.nonblock = true @@ -24,7 +24,7 @@ result << s end } - assert_raise(IOError) {w.flush} + assert_raise(IOError, "[ruby-dev:24985]") {w.flush} assert_nothing_raised {t.join} assert_equal(4097, result.size) end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml