banditcpp / bandit

Human-friendly unit testing for C++11
https://banditcpp.github.io/bandit/
Other
259 stars 37 forks source link

Use virtual destructors in interfaces #132

Closed sbeyer closed 6 years ago

sbeyer commented 6 years ago

In some interfaces, the declaration of virtual destructors has been forgotten. They are now added which revealed another bug in some specs where the colorizer can be destructed before the reporter using that colorizer is destructed. This bug is also fixed.

This PR also fixes a readability issue with std::unique_ptr assignments.

codecov-io commented 6 years ago

Codecov Report

Merging #132 into master will increase coverage by <.01%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #132      +/-   ##
==========================================
+ Coverage   98.61%   98.62%   +<.01%     
==========================================
  Files          34       34              
  Lines         940      943       +3     
  Branches       74       74              
==========================================
+ Hits          927      930       +3     
  Misses         13       13
Impacted Files Coverage Δ
bandit/reporters/interface.h 100% <100%> (ø) :arrow_up:
bandit/failure_formatters/interface.h 100% <100%> (ø) :arrow_up:
bandit/colorizers/interface.h 100% <100%> (ø) :arrow_up:
bandit/context.h 100% <100%> (ø) :arrow_up:
bandit/adapters/interface.h 100% <100%> (ø) :arrow_up:
bandit/run_policies/interface.h 100% <100%> (ø) :arrow_up:

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 caee1a0...c0dbad7. Read the comment docs.