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

ruby-changes:21561

From: ayumin <ko1@a...>
Date: Wed, 2 Nov 2011 00:52:59 +0900 (JST)
Subject: [ruby-changes:21561] ayumin:r33610 (trunk): * test/psych/test_yamldbm.rb: avoid platform dependency.

ayumin	2011-11-02 00:52:48 +0900 (Wed, 02 Nov 2011)

  New Revision: 33610

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

  Log:
    * test/psych/test_yamldbm.rb: avoid platform dependency.
      patch by Naohisa Goto. [ruby-dev:44763] [Bug #5535]
    * test/syck/test_yamldbm.rb: ditto.

  Modified files:
    trunk/ChangeLog
    trunk/test/psych/test_yamldbm.rb
    trunk/test/syck/test_yamldbm.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 33609)
+++ ChangeLog	(revision 33610)
@@ -1,3 +1,9 @@
+Wed Nov 02 00:43:59 2011  Ayumu AIZAWA  <ayumu.aizawa@g...>
+
+	* test/psych/test_yamldbm.rb: avoid platform dependency.
+	  patch by Naohisa Goto. [ruby-dev:44763] [Bug #5535]
+	* test/syck/test_yamldbm.rb: ditto.
+
 Wed Nov  2 00:14:15 2011  Shugo Maeda  <shugo@r...>
 
 	* test/ruby/test_marshal.rb: renamed methods duplicated with those
Index: test/psych/test_yamldbm.rb
===================================================================
--- test/psych/test_yamldbm.rb	(revision 33609)
+++ test/psych/test_yamldbm.rb	(revision 33610)
@@ -48,7 +48,7 @@
     def test_to_a
       @yamldbm['a'] = 'b'
       @yamldbm['c'] = 'd'
-      assert_equal([['a','b'],['c','d']], @yamldbm.to_a)
+      assert_equal([['a','b'],['c','d']], @yamldbm.to_a.sort)
     end
 
     def test_to_hash
@@ -97,8 +97,8 @@
     def test_shift
       @yamldbm['a'] = 'b'
       @yamldbm['c'] = 'd'
-      assert_equal(['a','b'], @yamldbm.shift)
-      assert_equal(['c','d'], @yamldbm.shift)
+      assert_equal([['a','b'], ['c','d']],
+                   [@yamldbm.shift, @yamldbm.shift].sort)
       assert_nil @yamldbm.shift
     end
 
@@ -166,7 +166,7 @@
       assert_equal [], @yamldbm.values
       @yamldbm['a'] = 'b'
       @yamldbm['c'] = 'd'
-      assert_equal ['b','d'], @yamldbm.values
+      assert_equal ['b','d'], @yamldbm.values.sort
     end
 
     def test_values_at
Index: test/syck/test_yamldbm.rb
===================================================================
--- test/syck/test_yamldbm.rb	(revision 33609)
+++ test/syck/test_yamldbm.rb	(revision 33610)
@@ -48,7 +48,7 @@
     def test_to_a
       @yamldbm['a'] = 'b'
       @yamldbm['c'] = 'd'
-      assert_equal([['a','b'],['c','d']], @yamldbm.to_a)
+      assert_equal([['a','b'],['c','d']], @yamldbm.to_a.sort)
     end
 
     def test_to_hash
@@ -97,8 +97,8 @@
     def test_shift
       @yamldbm['a'] = 'b'
       @yamldbm['c'] = 'd'
-      assert_equal(['a','b'], @yamldbm.shift)
-      assert_equal(['c','d'], @yamldbm.shift)
+      assert_equal([['a','b'], ['c','d']],
+                   [@yamldbm.shift, @yamldbm.shift].sort)
       assert_nil @yamldbm.shift
     end
 
@@ -166,7 +166,7 @@
       assert_equal [], @yamldbm.values
       @yamldbm['a'] = 'b'
       @yamldbm['c'] = 'd'
-      assert_equal ['b','d'], @yamldbm.values
+      assert_equal ['b','d'], @yamldbm.values.sort
     end
 
     def test_values_at

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

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