Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@Flamefire
Copy link
Collaborator

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)

Rename test functions to reflect what they do and enhance test for invalid byte skipping
Prefix all filenames used by the test path, e.g. /foo/test/test_bar-test.txt
As each exe has either a unique name or a unique path (build variants in B2) this avoids tests running in parallel accessing the same files which can cause spurious failures.
There may be warnings about a constant condition (over `sizof(CharType)`) which can be avoided using a switch.
Also use a cast instead of the union-based type punning to check for endianess
@codecov
Copy link

codecov bot commented Nov 26, 2022

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

@@            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 Coverage Δ
src/boost/locale/encoding/conv.hpp 92.30% <88.88%> (+3.41%) ⬆️
test/test_codepage.cpp 95.23% <98.50%> (+0.37%) ⬆️

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 1558586...c34e0d5. Read the comment docs.

@Flamefire Flamefire merged commit fb4fa71 into boostorg:master Nov 27, 2022
@Flamefire Flamefire deleted the test-fixes branch November 27, 2022 09:25
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.

1 participant