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

Clip_Tests: Remove try/catch blocks #468

Merged
merged 2 commits into from Mar 19, 2020

Conversation

ferdnyc
Copy link
Contributor

@ferdnyc ferdnyc commented Mar 19, 2020

UnitTest++ has its own exception handling (you can even CHECK_THROW() to test that a call throws an exception as expected), so the try/catch blocks in the Clip unit tests serve no purpose except to add unreachable code.

This PR replaces them with REQUIRE CHECK_EQUAL(true, success); checks on the result var from the previous call (the one that, when it was found false, the test used to throw()).

@ferdnyc ferdnyc added the tests Changes related to the unit tests and/or code coverage label Mar 19, 2020
@ferdnyc
Copy link
Contributor Author

ferdnyc commented Mar 19, 2020

I believe this should raise the internal coverage of our unit tests to 100%, meaning that every line of the test code (not the tested code) is reached during the test run. As it should be.

Now we just have to get the overall coverage up.

@codecov-io
Copy link

Codecov Report

Merging #468 into develop will increase coverage by 0.08%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #468      +/-   ##
===========================================
+ Coverage    48.04%   48.12%   +0.08%     
===========================================
  Files          128      128              
  Lines         9941     9934       -7     
===========================================
+ Hits          4776     4781       +5     
+ Misses        5165     5153      -12     
Impacted Files Coverage Δ
tests/Clip_Tests.cpp 100.00% <100.00%> (+10.43%) ⬆️

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 816118b...818ce5a. Read the comment docs.

@ferdnyc
Copy link
Contributor Author

ferdnyc commented Mar 19, 2020

Merging, as the change has the intended effect.

@ferdnyc ferdnyc merged commit 2c6d25e into OpenShot:develop Mar 19, 2020
@ferdnyc ferdnyc deleted the clip-tests-exceptions branch March 19, 2020 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Changes related to the unit tests and/or code coverage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants