Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UnitTest may fail when the platform does not support handling localization-related operations #2846

Closed
wants to merge 1 commit into from

Conversation

jackwenshann
Copy link

@jackwenshann jackwenshann commented Aug 22, 2023

Fixed the situation that the locale function encountered a situation that the platform did not support when handling localization-related operations, resulting in test failure

Fixed the situation that the locale function encountered a situation that the platform did not support when handling localization-related operations, resulting in test failure
BOOST_CHECK_EQUAL(to_string(1000000), "1000000");
BOOST_CHECK_EQUAL(to_string(1000000), "1000000");
} catch (const std::runtime_error& e) {

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Empty catch-all clauses are triggering some sort of "Are you sure?" reflex. Especially if the patch is called a fix. I would rather label it as "curing a symptom". Can we have at least a comment explaining why this is the optimal way to handle it?

BOOST_CHECK_EQUAL(to_string(1.5f), "1.5");
BOOST_CHECK_EQUAL(to_string(1.5L), "1.5");
} catch (const std::runtime_error& e) {

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here.

@Jens-G Jens-G added the c++ label Aug 22, 2023
@Jens-G Jens-G changed the title fix UnitTests Failed UnitTest may fail when the platform does not support handling localization-related operations Sep 3, 2023
@jackwenshann jackwenshann closed this by deleting the head repository Sep 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants