PageRenderTime 46ms CodeModel.GetById 22ms RepoModel.GetById 1ms app.codeStats 0ms

/vendor/gems/facets-2.4.5/test/core/integer/test_odd.rb

https://bitbucket.org/mediashelf/fedora-migrator
Ruby | 16 lines | 12 code | 4 blank | 0 comment | 2 complexity | 6e99fe60369e3964ce24a13488a30f0b MD5 | raw file
Possible License(s): GPL-3.0, GPL-2.0, IPL-1.0, AGPL-1.0, LGPL-3.0
  1. require 'facets/integer/odd'
  2. require 'test/unit'
  3. class TC_Integer < Test::Unit::TestCase
  4. def test_odd?
  5. (-101..101).step(2) do |n|
  6. assert(n.odd? == true)
  7. end
  8. (-100..100).step(2) do |n|
  9. assert(n.odd? == false)
  10. end
  11. end
  12. end