Hi,if I try testing a code like this:TEST(SampleTest, Test0){std::vector< int> a(0,1);std::vector< int>::iterator itE=a.end();a.insert(itE, 1);a.insert(itE, 2);}which basically tries to insert a new element to the invalid position, Google Test framework will report this:Note: Google Test filter = SampleTest.Test0[==========] Running 1 test from 1 test case.[----------] Global test environment set-up.[----------] 1 test from SampleTest[ RUN ] SampleTest.Test0It looks like it tries to handle SEH exception but fails to allocate new memory because of corruption and has to finish test silently.Is there a way to make gtest report test as failing?ThanksAndrey--
---
You received this message because you are subscribed to the Google Groups "Google C++ Testing Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to googletestframe...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
It looks like it tries to handle SEH exception but fails to allocate new memory because of corruption and has to finish test silently.Is there a way to make gtest report test as failing?
On Mon, May 20, 2013 at 5:23 AM, Andrey Z. <zam...@gmail.com> wrote:Although this is in the realm of undefined behavior (as Billy O'Neal explained), several Standard Library implementations have optional debugging that should help catch problems like this. I'd recommend enabling it when building your test suites.It looks like it tries to handle SEH exception but fails to allocate new memory because of corruption and has to finish test silently.Is there a way to make gtest report test as failing?