瀏覽代碼

Fix for JRuby (assert_true is not present).

Josh Haberman 9 年之前
父節點
當前提交
a207a2bd00
共有 2 個文件被更改,包括 3 次插入3 次删除
  1. 2 2
      ruby/tests/basic.rb
  2. 1 1
      ruby/tests/well_known_types_test.rb

+ 2 - 2
ruby/tests/basic.rb

@@ -468,9 +468,9 @@ module BasicTest
       assert m.length == 2
       assert m.length == 2
 
 
       m2 = m.dup
       m2 = m.dup
-      assert m == m2
+      assert_equal m, m2
       assert m.hash != 0
       assert m.hash != 0
-      assert m.hash == m2.hash
+      assert_equal m.hash, m2.hash
 
 
       collected = {}
       collected = {}
       m.each { |k,v| collected[v] = k }
       m.each { |k,v| collected[v] = k }

+ 1 - 1
ruby/tests/well_known_types_test.rb

@@ -92,7 +92,7 @@ class TestWellKnownTypes < Test::Unit::TestCase
     ts = Google::Protobuf::Timestamp.new(seconds: 12345, nanos: 6789)
     ts = Google::Protobuf::Timestamp.new(seconds: 12345, nanos: 6789)
     any.pack(ts)
     any.pack(ts)
 
 
-    assert_true any.is(Google::Protobuf::Timestamp)
+    assert any.is(Google::Protobuf::Timestamp)
     assert_equal ts, any.unpack(Google::Protobuf::Timestamp)
     assert_equal ts, any.unpack(Google::Protobuf::Timestamp)
   end
   end
 end
 end