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

test: Unit test for CResult matcher #712

Merged
merged 1 commit into from
Feb 3, 2021
Merged

test: Unit test for CResult matcher #712

merged 1 commit into from
Feb 3, 2021

Conversation

gumb0
Copy link
Collaborator

@gumb0 gumb0 commented Feb 1, 2021

This improves coverage in asserts.hpp

@gumb0 gumb0 force-pushed the cresult-test branch 2 times, most recently from ffe9944 to fe60cde Compare February 1, 2021 18:43
@codecov
Copy link

codecov bot commented Feb 1, 2021

Codecov Report

Merging #712 (3926a6d) into master (57fdd8f) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #712      +/-   ##
==========================================
+ Coverage   99.32%   99.33%   +0.01%     
==========================================
  Files          73       73              
  Lines       10885    10917      +32     
==========================================
+ Hits        10811    10844      +33     
+ Misses         74       73       -1     
Flag Coverage Δ
rust 99.61% <ø> (ø)
spectests 90.84% <ø> (ø)
unittests 99.32% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
test/unittests/test_utils_test.cpp 100.00% <100.00%> (ø)
test/utils/asserts.hpp 100.00% <0.00%> (+2.94%) ⬆️

@gumb0 gumb0 marked this pull request as ready for review February 1, 2021 18:49
@gumb0 gumb0 requested review from chfast and axic February 1, 2021 19:26

EXPECT_THAT(trap, Not(CResult(0_u32)));
EXPECT_THAT(result_void, Not(CResult(0_u32)));
FizzyValue value_i32{0};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would we be better not using 0 but actual values in these tests?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure, but maybe we would, I'll change it.

@gumb0 gumb0 merged commit 54daf26 into master Feb 3, 2021
@gumb0 gumb0 deleted the cresult-test branch February 3, 2021 13:02
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.

3 participants