Opened 5 years ago

Last modified 3 years ago

#268 new defect

Test suite and unit test failure

Reported by: chiavix@… Owned by: anonymous
Priority: normal Component: test
Severity: normal Keywords:
Cc:

Description

PostgreSQL 9.2.3 libpqxx 4.0.1 Windows 7 Enterprise 32 bit Visual Studio Premium 2012 32 bit

Test suite failure (ALL, ALL DEBUG=1, ALL DLL=1, ALL DLL=1 DEBUG=1)

Test failure in test/test000.cxx line 36: String mismatch for double (val <> ref: expected=nan, actual=1.#QNAN0) FAILED: test_000

Unit test failure (ALL, ALL DEBUG=1, ALL DLL=1, ALL DLL=1 DEBUG=1)

Exception: Could not convert string to numeric value: '1000...(lots of zeroes here)...000.#INF00' FAILED: infinity_test

Change History (5)

comment:1 Changed 4 years ago by RichardWef

  • version changed from 4.0 to 3.1
Last edited 3 years ago by jtv (previous) (diff)

comment:2 Changed 3 years ago by RichardWef

  • version changed from 3.1 to 2.5
Last edited 3 years ago by jtv (previous) (diff)

comment:3 Changed 3 years ago by jtv

  • milestone 3.1 deleted

Milestone 3.1 deleted

comment:4 Changed 3 years ago by jtv

Visual C++ seems to have a very strange representation of infinity: it looks like a number with the ".#INF" part inserted. I vaguely remember this mattering somewhere in the code, but I haven't found the place back yet.

comment:5 Changed 3 years ago by anonymous

  • Owner changed from jtv to anonymous

just add to test000.cxx

#if defined(_MSC_VER) inline void strconv(string type, const double &Obj,string expected) {

expected = "1.#QNAN0"; string Objstr(to_string(Obj)); check(expected, Objstr, type); Objstr="NAN"; double NewObj?; from_string(Objstr, NewObj?); check(expected, to_string(NewObj?), "recycled " + type);

} #endif

Note: See TracTickets for help on using tickets.