Sha256: b754b929a9e9c9b3354413c1c74bf27b82ba5ca0a595cd5575f23956a5b3c9c4

Contents?: true

Size: 324 Bytes

Versions: 2

Compression:

Stored size: 324 Bytes

Contents

require 'test/unit'

require 'approximately_equals'

class TC_approximately_equals < Test::Unit::TestCase

  def test_approximately_equals
    assert(!(1 =~ 1.001))
    assert(1 =~ 1.000000000000001)
    assert(1.approximately_equals?(1.001,0.01))
    Numeric.epsilon = 0.01
    assert(1 =~ 1.001)
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
eymiha_math-0.1.0 test/tc_approximately_equals.rb
eymiha_math-0.1.1 test/tc_approximately_equals.rb