Opened 12 years ago
Closed 12 years ago
#5037 closed Bugs (fixed)
test_output fails on trivial "inf" and "nan" formatting differences
Reported by: | Owned by: | Steven Watanabe | |
---|---|---|---|
Milestone: | Boost 1.46.0 | Component: | units |
Version: | Boost Development Trunk | Severity: | Regression |
Keywords: | Cc: |
Description
test_output fails on trivial, platform-specific output formatting differences. In the output below you see different forms of expected results: "1.#INF", "-1.#INF", "-nan", etc.
Since (I think) C++ doesn't define these specifically, perhaps a regex should be used to capture all variants.
Mingw-64 GCC 4.6, as of 1/4/2011:
../libs/units/test/test_output.cpp(322): error in "test_output_autoprefixed_quantity_name": check ss.str() == "inf meter" failed [1.#INF meter != inf meter] ../libs/units/test/test_output.cpp(322): error in "test_output_autoprefixed_quantity_name": check ss.str() == L"inf meter" failed ../libs/units/test/test_output.cpp(323): error in "test_output_autoprefixed_quantity_name": check ss.str() == "-inf meter" failed [-1.#INF meter != -inf meter] ../libs/units/test/test_output.cpp(323): error in "test_output_autoprefixed_quantity_name": check ss.str() == L"-inf meter" failed ../libs/units/test/test_output.cpp(324): error in "test_output_autoprefixed_quantity_name": check ss.str() == "nan meter" failed [1.#QNAN meter != nan meter] ../libs/units/test/test_output.cpp(324): error in "test_output_autoprefixed_quantity_name": check ss.str() == L"nan meter" failed ../libs/units/test/test_output.cpp(325): error in "test_output_autoprefixed_quantity_name": check ss.str() == "-nan meter" failed [-1.#IND meter != -nan meter] ../libs/units/test/test_output.cpp(325): error in "test_output_autoprefixed_quantity_name": check ss.str() == L"-nan meter" failed
FreeBSD8 GCC 4.2.1, as of 1/4/2011:
../libs/units/test/test_output.cpp(325): error in "test_output_autoprefixed_quantity_name": check ss.str() == "-nan meter" failed [nan meter != -nan meter] ../libs/units/test/test_output.cpp(325): error in "test_output_autoprefixed_quantity_name": check ss.str() == L"-nan meter" failed
Other platform failures are similiar.
Change History (4)
comment:1 by , 12 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:2 by , 12 years ago
comment:4 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Note:
See TracTickets
for help on using tickets.
(In [67668]) Regexify testing of infinity and NaN. Refs #5037.