Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#471 closed defect (fixed)

GEOSisValidDetailTest fails with MSVC 2008

Reported by: bgp2000 Owned by: mloskot
Priority: major Milestone: 3.3.1
Component: Unit Tests Version: 3.3.0
Severity: Unassigned Keywords: MSVC
Cc:

Description (last modified by mloskot)

capi::GEOSisValidDetail: ..NOTICE: ParseException: Expected number but encountered word: 'NaN'
...
---> group: capi::GEOSisValidDetail, test: test<3>
     problem: assertion failed

The problem is in the lines:

      geom_ = GEOSGeomFromWKT("LINESTRING(0 0, 10 0, NaN -5)");
      ensure(0 != geom_);

At least on Windows strtod() does not accept the string "NaN".

Change History (5)

comment:1 by mloskot, 13 years ago

Status: newassigned

comment:2 by mloskot, 13 years ago

Description: modified (diff)
Resolution: fixed
Status: assignedclosed

Test disabled in r3469

comment:3 by strk, 13 years ago

Would it be happy with "nan" ?

comment:4 by bgp2000, 13 years ago

Afraid not. You'll have to use strcmp or something similar.

comment:5 by mloskot, 13 years ago

strtod("NAN")

and derived variations are C99 feature only.

Note: See TracTickets for help on using tickets.