Closed GoogleCodeExporter closed 9 years ago
I don't know why haven't hit this before, or why I wasn't paying more attention
during the original discussion, but this seems *extremely* unintuitive. Why
isn't
this the *default* behavior? When I write an "ASSERT_()" I want it to behavie
like
"assert()" might, but limited only to the test case. What are the implementation
challenges to making this happen? I'd much rather have a
"IGNORE_FATAL_FAILURES()"
macro than the proposed macro pattern.
Again, apologies for not bringing this up during the initial discussion, or
missing
it if it was already addressed.
-Chandler
Original comment by chandl...@gmail.com
on 5 Aug 2008 at 7:35
Chandler, the problem is that gtest needs to compile where exceptions are
turned off,
which rules out throw. long-jump is not an option either as its behavior is
undefined in a C++ program where objects can have non-trivial destructors.
Original comment by shiq...@gmail.com
on 5 Aug 2008 at 8:02
I suppose an alternative might be to always fork (on *NIX platforms, anyway)
before
running a test, as in death tests, implementing ASSERT* using process death.
That
would cleanly deliver Chandler's desired semantics, I think. Is this too
expensive?
Bob
Original comment by Bob.Side...@gmail.com
on 5 Aug 2008 at 8:13
fork() is too heavy-handed as it changes the behavior of existing tests when
they
have side effects. We also don't want Google Test's behavior to diverage on
different platforms.
Note that death tests come with some caveats. In particular, fork() doesn't
work
well with threads, and thus cannot be used in the general test runner. fork()
also
makes debugging much harder as now the users need to deal with multiple
processes.
Original comment by shiq...@gmail.com
on 5 Aug 2008 at 8:21
Original comment by shiq...@gmail.com
on 30 Sep 2008 at 4:13
Original comment by markus.h...@gmail.com
on 30 Sep 2008 at 4:52
Done in trunk.
Original comment by shiq...@gmail.com
on 12 Oct 2008 at 3:22
Original issue reported on code.google.com by
shiq...@gmail.com
on 5 Aug 2008 at 7:24