From b37ffb93457d6ad68685c53abfd4f7338e773dac Mon Sep 17 00:00:00 2001 From: Peter Zhu Date: Tue, 30 Jul 2024 09:02:23 -0400 Subject: [PATCH] Move incorrectly placed tests The tests for Integer#ceil was accidentally placed in test_truncate. --- test/ruby/test_integer.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/ruby/test_integer.rb b/test/ruby/test_integer.rb index 0312a1a34c..c2cad36aa4 100644 --- a/test/ruby/test_integer.rb +++ b/test/ruby/test_integer.rb @@ -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)