boostorg / locale

Boost.Locale
Boost Software License 1.0
32 stars 70 forks source link

Test fixes #143

Closed Flamefire closed 1 year ago

Flamefire commented 1 year ago

Fix spurious test failures especially for parallel builds via B2 with multiple variants.

This is caused by access to files with fixed names, so different variants of the same test or even different tests using the same filename may interfere with each other.

Also fix a "constant condition" warning in utf_name() and a bit of refactoring to make the tests easier to read (almost only renaming with no actual change to behavior)

codecov[bot] commented 1 year ago

Codecov Report

Merging #143 (c34e0d5) into master (1558586) will increase coverage by 0.03%. The diff coverage is 97.36%.

Additional details and impacted files [![Impacted file tree graph](https://codecov.io/gh/boostorg/locale/pull/143/graphs/tree.svg?width=650&height=150&src=pr&token=vF6mWvgGUn&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=boostorg)](https://codecov.io/gh/boostorg/locale/pull/143?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=boostorg) ```diff @@ Coverage Diff @@ ## master #143 +/- ## ========================================== + Coverage 88.00% 88.04% +0.03% ========================================== Files 104 104 Lines 9154 9181 +27 ========================================== + Hits 8056 8083 +27 Misses 1098 1098 ``` | [Impacted Files](https://codecov.io/gh/boostorg/locale/pull/143?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=boostorg) | Coverage Δ | | |---|---|---| | [src/boost/locale/encoding/conv.hpp](https://codecov.io/gh/boostorg/locale/pull/143/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=boostorg#diff-c3JjL2Jvb3N0L2xvY2FsZS9lbmNvZGluZy9jb252LmhwcA==) | `92.30% <88.88%> (+3.41%)` | :arrow_up: | | [test/test\_codepage.cpp](https://codecov.io/gh/boostorg/locale/pull/143/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=boostorg#diff-dGVzdC90ZXN0X2NvZGVwYWdlLmNwcA==) | `95.23% <98.50%> (+0.37%)` | :arrow_up: | ------ [Continue to review full report at Codecov](https://codecov.io/gh/boostorg/locale/pull/143?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=boostorg). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=boostorg) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://codecov.io/gh/boostorg/locale/pull/143?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=boostorg). Last update [1558586...c34e0d5](https://codecov.io/gh/boostorg/locale/pull/143?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=boostorg). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=boostorg).