/vendor/gems/facets-2.4.5/test/core/integer/test_odd.rb
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
- require 'facets/integer/odd'
- require 'test/unit'
- class TC_Integer < Test::Unit::TestCase
- def test_odd?
- (-101..101).step(2) do |n|
- assert(n.odd? == true)
- end
- (-100..100).step(2) do |n|
- assert(n.odd? == false)
- end
- end
- end