rollbear / trompeloeil

Header only C++14 mocking framework
Boost Software License 1.0
811 stars 86 forks source link

Verifies calls that are expected after an object dies #241

Closed andy-saul-audinate closed 3 years ago

andy-saul-audinate commented 3 years ago

Sequence calls are not retired when a deathwatched object is destroyed. This means that subsquent IN_SEQUENCE assertions on other objects are not honoured

Minimal bug repro: https://godbolt.org/z/Y7sWb163K

This PR resolves this issue

Hopefully the style is consistent with existing code. I couldn't find a clang-format or similar guidance. If the test name is too long, or if there are any other problems with this PR, please let me know :)

codecov[bot] commented 3 years ago

Codecov Report

Merging #241 (97e2a0b) into main (3318ea8) will increase coverage by 0.00%. The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #241   +/-   ##
=======================================
  Coverage   97.73%   97.74%           
=======================================
  Files           1        1           
  Lines         884      887    +3     
=======================================
+ Hits          864      867    +3     
  Misses         20       20           
Impacted Files Coverage Δ
include/trompeloeil.hpp 97.74% <100.00%> (+<0.01%) :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 3318ea8...97e2a0b. Read the comment docs.

rollbear commented 3 years ago

Very nice! Thank you.