JBehave

Double.NaN should be parseable into a double

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Duplicate
  • Affects Version/s: None
  • Fix Version/s: 2.4
  • Component/s: Core
  • Labels:
    None
  • Number of attachments :
    0

Description

NaN, used as an error condition in mathematical algorithms, should be supported as a double. Currently NaN does not work. It throws a ParseException.

Activity

Hide
James Ravn added a comment -

This affects 2.3.2 (can't edit my ticket it seems...).

Show
James Ravn added a comment - This affects 2.3.2 (can't edit my ticket it seems...).
Hide
Mauro Talevi added a comment -

James, NaN and Infinity values are already supported for parsing single numbers.

I've added ParameterConvertersBehaviour.shouldConvertNaNAndInfinityValuesToNumbers() to verify behaviour.

I suspect you may be experiencing this problem when parsing list of doubles, in which case the issue has been solved in JBEHAVE-223, which now uses the NumberConverter to parse lists of specific number types.

Show
Mauro Talevi added a comment - James, NaN and Infinity values are already supported for parsing single numbers. I've added ParameterConvertersBehaviour.shouldConvertNaNAndInfinityValuesToNumbers() to verify behaviour. I suspect you may be experiencing this problem when parsing list of doubles, in which case the issue has been solved in JBEHAVE-223, which now uses the NumberConverter to parse lists of specific number types.
Hide
Mauro Talevi added a comment -

Duplicate of JBEHAVE-223. Verified lists of NaN and Infinity values can now be converted.

Show
Mauro Talevi added a comment - Duplicate of JBEHAVE-223. Verified lists of NaN and Infinity values can now be converted.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: