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

[WIP] enhance unit testing #4597

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from
Draft

Conversation

ChristianBeer
Copy link
Member

Some simple enhancements to unit testing. Still WIP.

Description of the Change
More unit testing of library functions.

Alternate Designs
Alternatively one could add the reference files to git and copy them into the directory where tests are executed but that seemed more work than reading and writing directly from within the test.

Release Notes
N/A

@ChristianBeer ChristianBeer added the C: Testing Integration and Unit testing label Dec 26, 2021
@ChristianBeer ChristianBeer marked this pull request as draft December 26, 2021 23:38
@codecov
Copy link

codecov bot commented Dec 27, 2021

Codecov Report

Merging #4597 (8275531) into master (6f8fba3) will increase coverage by 0.25%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##             master    #4597      +/-   ##
============================================
+ Coverage     10.90%   11.16%   +0.25%     
  Complexity     1044     1044              
============================================
  Files           277      277              
  Lines         35626    35627       +1     
  Branches       7852     7852              
============================================
+ Hits           3886     3976      +90     
+ Misses        31520    31431      -89     
  Partials        220      220              
Impacted Files Coverage Δ
lib/parse.h 54.76% <0.00%> (-0.89%) ⬇️
lib/filesys.cpp 4.20% <0.00%> (+4.20%) ⬆️
lib/miofile.cpp 28.00% <0.00%> (+5.02%) ⬆️
lib/md5_file.cpp 67.79% <0.00%> (+6.77%) ⬆️
lib/url.cpp 97.43% <0.00%> (+8.62%) ⬆️
lib/base64.cpp 89.47% <0.00%> (+11.88%) ⬆️
lib/miofile.h 100.00% <0.00%> (+20.00%) ⬆️
lib/mem_usage.cpp 69.23% <0.00%> (+69.23%) ⬆️
lib/project_init.cpp 100.00% <0.00%> (+100.00%) ⬆️

Rearranged the lines alphabetically to better compare it with the source files.
Also uses EXPECT_instead of ASSERT_ because with ASSERT_ the test immediately stops not executing the remaining tests of a suite. It's better to execute all tests and get a better picture what is failing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: Testing Integration and Unit testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant