Comments (7)
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 [email protected]
on 5 Aug 2008 at 7:35
from googletest.
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 [email protected]
on 5 Aug 2008 at 8:02
from googletest.
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 [email protected]
on 5 Aug 2008 at 8:13
from googletest.
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 [email protected]
on 5 Aug 2008 at 8:21
from googletest.
Original comment by [email protected]
on 30 Sep 2008 at 4:13
- Added labels: Priority-High
- Removed labels: Priority-Medium
from googletest.
Original comment by [email protected]
on 30 Sep 2008 at 4:52
from googletest.
Done in trunk.
Original comment by [email protected]
on 12 Oct 2008 at 3:22
- Changed state: Fixed
from googletest.
Related Issues (20)
- Hh
- [Bug]: Non-standard function _exit used in gmock-spec-builders.cc on line 533
- [Bug]: Why the value GOOGLETEST_VERSION within the CMakeLists.txt in the release-1.8.1 is 1.9.0?
- [Bug]: --gtest_filter appears to cause some libraries not to load. HOT 1
- [Bug]: Missing documentation for Throws, ThrowsMessage matchers HOT 1
- [Bug]: testing::KilledBySignal on MinGW Windows is not defined HOT 3
- [Bug]: FloatingEqMatcher doesn't work with const float value types HOT 1
- Many errors building googletest with cmake and make on Windows 10 HOT 1
- [FR]: `FetchContent` on `googletest` subfolder HOT 1
- [FR]: Matcher for absl::StatusOr and std::expected HOT 6
- Google HOT 1
- [Bug]: Please title this bug report
- [Bug]: Again, Google, wtf is wrong with you
- [Bug]: Google has a wicked infested mindset and it is going down because of it. HOT 1
- [Bug]: Double free or corruption detected in first parameterized test HOT 3
- [FR]: Expose SetUpTestSuite and TearDownTestSuite getters and setters. HOT 1
- [Bug]: gtest_main.so doesn't contain symbols from gtest.so HOT 2
- [Bug]: Flaky infinite `AddressSanitizer:DEADLYSIGNAL` loop when using gtest in github CI HOT 5
- [Bug]: Cannot use structured binding in name generator lambda in INSTANTIATE_TEST_SUITE_P HOT 2
- [Bug]: A race condition exist between the Watcher thread and the main thread terminating.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from googletest.