The tests for Integer#ceil was accidentally placed in test_truncate.
This commit is contained in:
Peter Zhu 2024-07-30 09:02:23 -04:00
Родитель a7167d0cee
Коммит b37ffb9345
1 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -497,6 +497,10 @@ class TestInteger < Test::Unit::TestCase
assert_int_equal(1111_1111_1111_1111_1111_1111_1111_1111, 1111_1111_1111_1111_1111_1111_1111_1111.ceil(1))
assert_int_equal(10**400, (10**400).ceil(1))
assert_int_equal(10000000000, 1.ceil(-10), "[Bug #20654]")
assert_int_equal(100000000000000000000, 1.ceil(-20), "[Bug #20654]")
assert_int_equal(100000000000000000000000000000000000000000000000000, 1.ceil(-50), "[Bug #20654]")
end
def test_truncate
@ -525,10 +529,6 @@ class TestInteger < Test::Unit::TestCase
assert_int_equal(1111_1111_1111_1111_1111_1111_1111_1111, 1111_1111_1111_1111_1111_1111_1111_1111.truncate(1))
assert_int_equal(10**400, (10**400).truncate(1))
assert_int_equal(10000000000, 1.ceil(-10), "[Bug #20654]")
assert_int_equal(100000000000000000000, 1.ceil(-20), "[Bug #20654]")
assert_int_equal(100000000000000000000000000000000000000000000000000, 1.ceil(-50), "[Bug #20654]")
end
MimicInteger = Struct.new(:to_int)