Project

General

Profile

Bug #8417

assert_in_epsilon(-1, -1) failed

Added by Nobuhiro IMAI over 3 years ago. Updated over 3 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
ruby -v:
ruby 2.1.0dev (2013-05-18 trunk 40801) [x86_64-linux]
[ruby-core:55035]

Description

=begin
assert_in_epsilon(-1, -1) failed as below:

require "test/unit"

class AssertInEpsilonTest < Test::Unit::TestCase
def test_plus
assert_in_epsilon(1, 1)
end

def test_minus
assert_in_epsilon(-1, -1)
end
end

# >> Loaded suite -
# >> Started
# >> F
# >> ===============================================================================
# >> Failure:
# >> <-1> -/+ (<-1> * )[-0.001] expected to include
# >> <-1>.
# >>
# >> Relation:
# >> <<-1> < <-1>-(<-1>)[-0.999] <= <-1>+(<-1>)[-1.001]>
# >> test_minus(AssertInEpsilonTest)
# >> -:9:in `test_minus'
# >> ===============================================================================
# >> .
# >>
# >> Finished in 0.01199642 seconds.
# >>
# >> 2 tests, 2 assertions, 1 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
# >> 50% passed
# >>
# >> 166.72 tests/s, 166.72 assertions/s

Though I'm not sure the difference between "test" and "minitest",
minitest seems to be succeeded.

require "minitest/unit"

MiniTest::Unit::TestCase.new(?-).assert_in_epsilon(-1, -1)
=end

History

#1 [ruby-core:55036] Updated by Nobuhiro IMAI over 3 years ago

=begin
Oops, I forgot to show the result.

require "minitest/unit"

MiniTest::Unit::TestCase.new(?-).assert_in_epsilon(-1, -1) # => true
=end

#2 [ruby-core:55039] Updated by Nobuyoshi Nakada over 3 years ago

  • Status changed from Open to Feedback

I can't reproduce it.
And that failure message seems different.
What version of test/unit are you using?

#3 [ruby-core:55041] Updated by Kouhei Sutou over 3 years ago

  • % Done changed from 0 to 100
  • Status changed from Feedback to Rejected
  • Assignee set to Kouhei Sutou

It is a test-unit gem bug.
I'll fix it in test-unit gem!

#4 [ruby-core:55042] Updated by Nobuhiro IMAI over 3 years ago

Oh, I'm verry sorry, but I used test-unit external gem (2.5.4).
After removing it, the test-unit default gem (2.0.0.0) works fine.
Would you please to close this (or mark as 3rd patry's) issue? Thanks.

#5 [ruby-core:55043] Updated by Nobuhiro IMAI over 3 years ago

It is a test-unit gem bug.
I'll fix it in test-unit gem!

I noticed that just now.. Thanks in advance!

Also available in: Atom PDF