[前][次][番号順一覧][スレッド一覧]

ruby-changes:36672

From: nobu <ko1@a...>
Date: Wed, 10 Dec 2014 09:40:24 +0900 (JST)
Subject: [ruby-changes:36672] nobu:r48753 (trunk): test_cstr.rb: failed encoding name

nobu	2014-12-10 09:40:17 +0900 (Wed, 10 Dec 2014)

  New Revision: 48753

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=48753

  Log:
    test_cstr.rb: failed encoding name
    
    * test/-ext-/string/test_cstr.rb (test_wchar_long): show the
      failed encoding name in error messages.

  Modified files:
    trunk/test/-ext-/string/test_cstr.rb
Index: test/-ext-/string/test_cstr.rb
===================================================================
--- test/-ext-/string/test_cstr.rb	(revision 48752)
+++ test/-ext-/string/test_cstr.rb	(revision 48753)
@@ -33,10 +33,10 @@ class Test_StringCStr < Test::Unit::Test https://github.com/ruby/ruby/blob/trunk/test/-ext-/string/test_cstr.rb#L33
     len = str.size * n
     WCHARS.each do |enc|
       s = Bug::String.new(str.encode(enc))*n
-      assert_nothing_raised(ArgumentError) {s.cstr_term}
+      assert_nothing_raised(ArgumentError, enc.name) {s.cstr_term}
       s.set_len(s.bytesize / 2)
-      assert_equal(len / 2, s.size)
-      assert_equal(0, s.cstr_term)
+      assert_equal(len / 2, s.size, enc.name)
+      assert_equal(0, s.cstr_term, enc.name)
     end
   end
 

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]