Add tests for Integer#quo and Float#quo; #5268

This commit is contained in:
Yukihiro "Matz" Matsumoto
2021-01-17 23:01:41 +09:00
parent 12ff88563d
commit f4a3dc4f07
2 changed files with 11 additions and 0 deletions
+5
View File
@@ -41,6 +41,11 @@ assert('Float#/', '15.2.9.3.4') do
assert_float(1.0 , a)
assert_float(3.123456789, b)
end
assert('Float#quo') do
a = 3.123456789.quo(3.123456789)
assert_float(1.0 , a)
end
assert('Float#%', '15.2.9.3.5') do
a = 3.125 % 3.125
+6
View File
@@ -43,6 +43,12 @@ assert('Integer#/', '15.2.8.3.4') do
assert_equal 2.0, b
end
assert('Integer#quo') do
a = 6.quo(5)
assert_equal 1.2, a
end
assert('Integer#%', '15.2.8.3.5') do
a = 1%1
b = 1%1.0