Opened 10 years ago

Closed 5 years ago

Last modified 5 years ago

#2780 closed defect (fixed)

test_parse failing on OS X Mavericks

Reported by: historic_bruno Owned by: wraitii
Priority: Should Have Milestone: Alpha 24
Component: Core engine Keywords:
Cc: Krinkle, coldphoenix Patch: phab:D1988

Description (last modified by leper)

In TestCStr::test_parse:
/Users/ben/GitHub/0ad/source/ps/tests/test_CStr.h:136: Error: Expected (str3.ToFloat() == 3.0f), found (0.0000 != 3.0000)
/Users/ben/GitHub/0ad/source/ps/tests/test_CStr.h:137: Error: Expected (str3.ToDouble() == 3.0), found (0.0000 != 3.0000)

OS: OS X Mavericks 10.9.4 Compiler:

Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn) Target: x86_64-apple-darwin13.3.0 Thread model: posix libc++

Change History (9)

comment:1 by Echelon9, 10 years ago

Hi - I've seen and reported this a while ago.

If I remember correctly str3 in that test is equal to "3.0t" or something similar. Seems like a corner case tripping up with libc++

comment:3 by ben, 9 years ago

In 16408:

Updates OS X icon with multiple sizes and slightly reduced transparency to make it more easily clickable.
Updates OS X bundle build script, disables broken testing, refs #2780

comment:4 by leper, 7 years ago

Description: modified (diff)

Working LLVM bug report link: https://bugs.llvm.org/show_bug.cgi?id=17782

C++ LWG issue: https://cplusplus.github.io/LWG/lwg-active.html#2381

(And just to show that we aren't the only ones hitting this: https://savannah.gnu.org/bugs/?47413; there is also some (closed, as they added a workaround) bug report for chromium)

(Also closed #4653 as a dupe.)

comment:5 by Krinkle, 5 years ago

Cc: Krinkle added

comment:6 by coldphoenix, 5 years ago

Cc: coldphoenix added

Adding myself to CC as I’m also encountering this error.

comment:7 by Krinkle, 5 years ago

Patch: phab:D1988

Being worked on by wraitii at https://code.wildfiregames.com/D1988.

comment:8 by wraitii, 5 years ago

Owner: set to wraitii
Resolution: fixed
Status: newclosed

In 22908:

Workaround differences between libc and libstd string stream parsing of float/doubles.

libc and libstd differ on how they parse strings. This has a remote chance of breaking mods and 0 A.D. code, and it broke tests on MacOS.

Add a workaround to ensure they are consistent.

Comments by: vladislavbelov

Fixes #2780

Differential Revision: https://code.wildfiregames.com/D1988

comment:9 by Stan, 5 years ago

Milestone: BacklogAlpha 24
Note: See TracTickets for help on using tickets.