PageRenderTime 36ms CodeModel.GetById 12ms RepoModel.GetById 0ms app.codeStats 0ms

/test/-ext-/bignum/test_bigzero.rb

http://github.com/ruby/ruby
Ruby | 20 lines | 17 code | 2 blank | 1 comment | 0 complexity | 6ddf613cc9a526db06a7fe303a3fdd01 MD5 | raw file
Possible License(s): GPL-2.0, BSD-3-Clause, AGPL-3.0
  1. # frozen_string_literal: false
  2. require 'test/unit'
  3. require "-test-/bignum"
  4. class Test_Bignum < Test::Unit::TestCase
  5. class TestBigZero < Test::Unit::TestCase
  6. def test_equal_0
  7. bug8204 = '[ruby-core:53893] [Bug #8204]'
  8. (0..10).each do |i|
  9. assert_equal(0, Bug::Bignum.zero(i), "#{bug8204} Bignum.zero(#{i})")
  10. end
  11. end
  12. def test_zero?
  13. (0..10).each do |i|
  14. assert_equal(true, Bug::Bignum.zero(i).zero?)
  15. end
  16. end
  17. end
  18. end