Sha256: f3dfd1035ef01f269891eaaf773a9bbbc25285d2c714ffab1de64cc0825bf7cf

Contents?: true

Size: 305 Bytes

Versions: 4

Compression:

Stored size: 305 Bytes

Contents

covers 'facets/integer/odd'

# NOTE: Can't test on Integer directly b/c Ruby 1.8.7 defines separate
# methods for Fixnum.
testcase Fixnum do

  unit :odd? do
    (-101..101).step(2) do |n|
      n.odd?.assert == true
    end
    (-100..100).step(2) do |n|
      n.odd?.assert == false
    end
  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
facets-2.9.1 test/core/integer/test_odd.rb
facets-2.9.0 test/core/integer/test_odd.rb
facets-2.9.0.pre.2 test/core/integer/test_odd.rb
facets-2.9.0.pre.1 test/core/integer/test_odd.rb