2015-12-16 00:07:31 -05:00
|
|
|
# frozen_string_literal: false
|
2013-04-03 03:34:31 -04:00
|
|
|
require 'test/unit'
|
|
|
|
require "-test-/bignum"
|
|
|
|
|
2022-04-22 16:01:43 -04:00
|
|
|
class TestBignum_BigZero < Test::Unit::TestCase
|
|
|
|
def test_equal_0
|
|
|
|
bug8204 = '[ruby-core:53893] [Bug #8204]'
|
|
|
|
(0..10).each do |i|
|
|
|
|
assert_equal(0, Bug::Bignum.zero(i), "#{bug8204} Bignum.zero(#{i})")
|
2013-04-03 03:34:31 -04:00
|
|
|
end
|
2022-04-22 16:01:43 -04:00
|
|
|
end
|
2016-11-01 08:35:32 -04:00
|
|
|
|
2022-04-22 16:01:43 -04:00
|
|
|
def test_zero?
|
|
|
|
(0..10).each do |i|
|
|
|
|
assert_equal(true, Bug::Bignum.zero(i).zero?)
|
2016-11-01 08:35:32 -04:00
|
|
|
end
|
2013-04-03 03:34:31 -04:00
|
|
|
end
|
|
|
|
end
|