Exception when using user defined class with stl containers as attribute
diegomazala opened this issue · comments
May suggest a test that fails?
Insert a vector as an attribute
struct leak_checker {
leak_checker() { ++num_constructions; }
~leak_checker() { ++num_deletions; }
leak_checker(const leak_checker&) { ++num_constructions; }
leak_checker(leak_checker&&) { ++num_constructions; }
leak_checker& operator=(const leak_checker&) = default;
leak_checker& operator=(leak_checker&&) = default;
std::vector<float> numbers;
};
Really sorry for the inconveniences. Personally used the library only for POD structs and had no problems.
I am not sure about which test are you talking about though as there was an error for me which I fixed. Can you check if it is all OK now?
I just updated the repo code and test it again. It failed at the first test called "quick test for leaks".
Please, see the message below
projectd.exe is a Catch v1.9.6 host application.
Run with -? for options
-------------------------------------------------------------------------------
quick test for leaks
-------------------------------------------------------------------------------
c:\users\diego\projects\circular_buffer.git\test\main.cpp(51)
...............................................................................
c:\users\diego\projects\circular_buffer.git\test\main.cpp(63): FAILED:
REQUIRE( num_constructions == num_deletions )
with expansion:
138 == 132
with message:
constructions: 138deletions: 132
===============================================================================
test cases: 19 | 18 passed | 1 failed
assertions: 36519 | 36518 passed | 1 failed
Pressione qualquer tecla para continuar. . .
yep fixed
Great job
Thank you
Em qui, 12 de jul de 2018 às 16:00, Justas Masiulis <
notifications@github.com> escreveu:
… yep fixed
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#3 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AFpfhmAmf_X1Av-BIeZH4VyGFS1dL1c6ks5uF5y0gaJpZM4VKMPd>
.