Opened 5 years ago

Closed 2 months ago

Last modified 7 weeks 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 Changed 5 years ago by Echelon9

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 Changed 5 years ago by ben

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 Changed 2 years ago by leper

Description: modified (diff)

Working LLVM bug report link:

C++ LWG issue:

(And just to show that we aren't the only ones hitting this:; there is also some (closed, as they added a workaround) bug report for chromium)

(Also closed #4653 as a dupe.)

comment:5 Changed 5 months ago by Krinkle

Cc: Krinkle added

comment:6 Changed 4 months ago by coldphoenix

Cc: coldphoenix added

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

comment:7 Changed 4 months ago by Krinkle

Patch: phab:D1988

Being worked on by wraitii at

comment:8 Changed 2 months ago by wraitii

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:

comment:9 Changed 7 weeks ago by stanislas69

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