mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Moved tests for Integer#quo
The `Rational` class is never defined during core testing.
This commit is contained in:
@@ -309,3 +309,8 @@ assert 'Rational#**' do
|
||||
assert_float(16.0, (4r)**(2.0))
|
||||
assert_float(3.5**1.5, (7/2r)**(1.5))
|
||||
end
|
||||
|
||||
assert 'Integer#quo' do
|
||||
a = 6.quo(5)
|
||||
assert_equal 6/5r, a
|
||||
end
|
||||
|
||||
+1
-6
@@ -49,12 +49,7 @@ assert('Integer#/', '15.2.8.3.4') do
|
||||
assert_equal 2.0, b
|
||||
end
|
||||
|
||||
if Object.const_defined?(:Rational)
|
||||
assert('Integer#quo') do
|
||||
a = 6.quo(5)
|
||||
assert_equal 5/6r, a
|
||||
end
|
||||
elsif Object.const_defined?(:Float)
|
||||
if Object.const_defined?(:Float)
|
||||
assert('Integer#quo') do
|
||||
a = 6.quo(5)
|
||||
assert_equal 1.2, a
|
||||
|
||||
Reference in New Issue
Block a user