Skip to content

Locale setting and unittests #98

@kjetilly

Description

@kjetilly

On a standard Ubuntu 13.10-setup the CombinedUnitests fails with errors referring to boost lexical cast:

$ ./unittests/combined/combined_unittest 
Running 127 test cases...
unknown location(0): fatal error in "parseExposedModelDocument": std::bad_cast: bad lexical cast: source type value could not be interpreted as target
/home/kjetilo/projects/tinia/unittests/modelxml/ExposedModelTest.cpp(479): last checkpoint
unknown location(0): fatal error in "getExposedModelUpdate": std::bad_cast: bad lexical cast: source type value could not be interpreted as target
/home/kjetilo/projects/tinia/unittests/modelxml/ExposedModelTest.cpp(635): last checkpoint
unknown location(0): fatal error in "getExposedModelUpdate2": std::bad_cast: bad lexical cast: source type value could not be interpreted as target
/home/kjetilo/projects/tinia/unittests/modelxml/ExposedModelTest.cpp(635): last checkpoint
unknown location(0): fatal error in "getExposedModelUpdate3": std::bad_cast: bad lexical cast: source type value could not be interpreted as target
/home/kjetilo/projects/tinia/unittests/modelxml/ExposedModelTest.cpp(635): last checkpoint
unknown location(0): fatal error in "getExposedModelUpdate4": std::bad_cast: bad lexical cast: source type value could not be interpreted as target
/home/kjetilo/projects/tinia/unittests/modelxml/ExposedModelTest.cpp(635): last checkpoint
unknown location(0): fatal error in "getExposedModelUpdateForMatrix": std::bad_cast: bad lexical cast: source type value could not be interpreted as target
/home/kjetilo/projects/tinia/unittests/modelxml/ExposedModelTest.cpp(635): last checkpoint
unknown location(0): fatal error in "updateState": std::bad_cast: bad lexical cast: source type value could not be interpreted as target
/home/kjetilo/projects/tinia/unittests/modelxml/ExposedModelTest.cpp(635): last checkpoint
(... renderlistoutput left out...)

*** 7 failures detected in test suite "CombinedTest"

while setting the LC_NUMERIC to en_US.UTF-8 works, i.e. running the program as
LC_NUMERIC="en_US.UTF-8" ./unittests/combined/combined_unittest

Also running the modelxml_unittest seperately does not exhibit the same errors.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions