Skip to content

Commit

Permalink
Showing 4 changed files with 9 additions and 11 deletions.
12 changes: 6 additions & 6 deletions test/jruby/test_higher_javasupport.rb
Original file line number Diff line number Diff line change
@@ -98,8 +98,8 @@ def test_constructors_and_instance_methods
assert_equal(10.0, Double.new("10").doubleValue())

assert_equal(Random, r.class)
assert_equal(Fixnum, r.nextInt.class)
assert_equal(Fixnum, r.nextInt(10).class)
assert_equal(Integer, r.nextInt.class)
assert_equal(Integer, r.nextInt(10).class)
end

Long = java.lang.Long
@@ -116,7 +116,7 @@ def test_dispatching_on_nil

def test_class_methods
result = java.lang.System.currentTimeMillis()
assert_equal(Fixnum, result.class)
assert_equal(Integer, result.class)
end

Boolean = java.lang.Boolean
@@ -644,7 +644,7 @@ def test_subclasses_and_their_return_types
r_returned = l.get(1)
# Since Random is a public class we should get the value casted as that
assert_equal("java.util.Random", r_returned.java_class.name)
assert(r_returned.nextInt.kind_of?(Fixnum))
assert(r_returned.nextInt.kind_of?(Integer))
end

HashMap = java.util.HashMap
@@ -1065,8 +1065,8 @@ def test_package_name_colliding_with_name_method
end

def test_package_object_id
assert org.jruby.object_id.is_a?(Fixnum)
assert Java::java::lang.object_id.is_a?(Fixnum)
assert org.jruby.object_id.is_a?(Integer)
assert Java::java::lang.object_id.is_a?(Integer)
end

def test_package_singleton_method_hooks
2 changes: 1 addition & 1 deletion test/jruby/test_ifaddr.rb
Original file line number Diff line number Diff line change
@@ -55,7 +55,7 @@ def test_broadaddr

def test_ifindex
getifaddrs.each do |ifaddr|
assert_instance_of(Fixnum,ifaddr.ifindex)
assert_instance_of(Integer, ifaddr.ifindex)
# TODO: (gf) this passes in an interactive Travis-CI VM, but fails under a Travis-CI build job
# assert(ifaddr.ifindex <= getifaddrs.size) # is in expected range
end
4 changes: 1 addition & 3 deletions test/jruby/test_integer_overflows.rb
Original file line number Diff line number Diff line change
@@ -585,9 +585,7 @@ def inzpect(valuev, recur_max_depthv = nil,
inzpect(valuev.end)
when Exception then
return valuev.class.name + ":" << valuev.to_s.inspect
when Bignum then
return valuev.inspect << "_big"
when Fixnum, Float, NilClass, TrueClass, FalseClass then
when Integer, Float, NilClass, TrueClass, FalseClass then
return valuev.inspect
else
unless Rational_loaded? && valuev.class == Rational then
2 changes: 1 addition & 1 deletion test/jruby/test_io.rb
Original file line number Diff line number Diff line change
@@ -210,7 +210,7 @@ def test_sysopen
ensure_files @file

fno = IO::sysopen(@file, "r", 0124) # not creating, mode is ignored
assert_instance_of(Fixnum, fno)
assert_instance_of(Integer, fno)
assert_raises(Errno::EINVAL) { IO.open(fno, "w") } # not writable
IO.open(fno, "r") do |io|
assert_equal(fno, io.fileno)

0 comments on commit b2cd9b8

Please sign in to comment.