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

Refactor icu_formatters_cache and tests #115

Merged
merged 3 commits into from
Sep 27, 2022

Conversation

Flamefire
Copy link
Collaborator

@Flamefire Flamefire commented Sep 26, 2022

  • Refactor test macros to make them a bit more efficient and easier to step through
  • Introduce enum format_len to be used as indices for the ICU cache replacing the magic constants.
  • Rename test_config to show_config (more appropriate name) and always show its output on CI (workaround until B2 natively supports that, CC @grafikrobot in case you want to see a use case)

Especially the `get_icu_currency_iso` was reevaluated multiple times for each subtest which is redundant.
So modify the macros to store the value as a `const std::string` evaluating it exactly once.
Use enums to access arrays.
@Flamefire Flamefire mentioned this pull request Sep 26, 2022
@codecov
Copy link

codecov bot commented Sep 27, 2022

Codecov Report

Merging #115 (04cd74d) into develop (e7a5464) will not change coverage.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff            @@
##           develop     #115   +/-   ##
========================================
  Coverage    84.20%   84.20%           
========================================
  Files           73       73           
  Lines         5794     5794           
========================================
  Hits          4879     4879           
  Misses         915      915           
Impacted Files Coverage Δ
test/show_config.cpp 96.22% <ø> (ø)
test/test_formatting.cpp 100.00% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e7a5464...04cd74d. Read the comment docs.

@Flamefire Flamefire merged commit c6debb7 into boostorg:develop Sep 27, 2022
@Flamefire Flamefire deleted the refactor branch September 27, 2022 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant