boostorg / locale

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

Minor refactoring and added tests #199

Closed Flamefire closed 11 months ago

Flamefire commented 11 months ago

Fix a warning ("0-as-nullptr") and add missing tests

Also some minor refactoring for clearer code.

codecov[bot] commented 11 months ago

Codecov Report

Merging #199 (c67a5f2) into develop (3c647f2) will increase coverage by 0.40%. The diff coverage is 99.35%.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/boostorg/locale/pull/199/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://app.codecov.io/gh/boostorg/locale/pull/199?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=boostorg) ```diff @@ Coverage Diff @@ ## develop #199 +/- ## =========================================== + Coverage 95.26% 95.66% +0.40% =========================================== Files 114 114 Lines 10002 10131 +129 =========================================== + Hits 9528 9692 +164 + Misses 474 439 -35 ``` | [Files](https://app.codecov.io/gh/boostorg/locale/pull/199?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=boostorg) | Coverage Δ | | |---|---|---| | [include/boost/locale/date\_time.hpp](https://app.codecov.io/gh/boostorg/locale/pull/199?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=boostorg#diff-aW5jbHVkZS9ib29zdC9sb2NhbGUvZGF0ZV90aW1lLmhwcA==) | `100.00% <100.00%> (+4.96%)` | :arrow_up: | | [include/boost/locale/formatting.hpp](https://app.codecov.io/gh/boostorg/locale/pull/199?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=boostorg#diff-aW5jbHVkZS9ib29zdC9sb2NhbGUvZm9ybWF0dGluZy5ocHA=) | `100.00% <100.00%> (ø)` | | | [include/boost/locale/hold\_ptr.hpp](https://app.codecov.io/gh/boostorg/locale/pull/199?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=boostorg#diff-aW5jbHVkZS9ib29zdC9sb2NhbGUvaG9sZF9wdHIuaHBw) | `100.00% <100.00%> (+5.55%)` | :arrow_up: | | [include/boost/locale/util.hpp](https://app.codecov.io/gh/boostorg/locale/pull/199?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=boostorg#diff-aW5jbHVkZS9ib29zdC9sb2NhbGUvdXRpbC5ocHA=) | `100.00% <ø> (+90.47%)` | :arrow_up: | | [src/boost/locale/icu/codecvt.cpp](https://app.codecov.io/gh/boostorg/locale/pull/199?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=boostorg#diff-c3JjL2Jvb3N0L2xvY2FsZS9pY3UvY29kZWN2dC5jcHA=) | `84.09% <100.00%> (+4.92%)` | :arrow_up: | | [test/test\_codecvt.cpp](https://app.codecov.io/gh/boostorg/locale/pull/199?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=boostorg#diff-dGVzdC90ZXN0X2NvZGVjdnQuY3Bw) | `100.00% <100.00%> (ø)` | | | [test/test\_date\_time.cpp](https://app.codecov.io/gh/boostorg/locale/pull/199?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=boostorg#diff-dGVzdC90ZXN0X2RhdGVfdGltZS5jcHA=) | `100.00% <100.00%> (ø)` | | | [test/test\_util.cpp](https://app.codecov.io/gh/boostorg/locale/pull/199?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=boostorg#diff-dGVzdC90ZXN0X3V0aWwuY3Bw) | `100.00% <100.00%> (ø)` | | | [test/test\_boundary.cpp](https://app.codecov.io/gh/boostorg/locale/pull/199?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=boostorg#diff-dGVzdC90ZXN0X2JvdW5kYXJ5LmNwcA==) | `97.82% <0.00%> (ø)` | | ... and [2 files with indirect coverage changes](https://app.codecov.io/gh/boostorg/locale/pull/199/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=boostorg) ------ [Continue to review full report in Codecov by Sentry](https://app.codecov.io/gh/boostorg/locale/pull/199?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://app.codecov.io/gh/boostorg/locale/pull/199?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=boostorg). Last update [3c647f2...c67a5f2](https://app.codecov.io/gh/boostorg/locale/pull/199?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).