Details
-
Suggestion
-
Resolution: Unresolved
-
P2: Important
-
None
-
None
-
None
-
8
-
1145e1709 (dev), eb3df4edb (dev), 4a352937e (6.9), 8d984800f (6.8), dc894e316 (tqtc/lts-6.5)
-
Foundation Sprint 123, Foundation Sprint 124, Foundation Sprint 125, Foundation Sprint 126, Foundation Sprint 127, Foundation Sprint 128, Foundation Sprint 129, Foundation Sprint 130
Description
I'm developing for and with Qt, and I'm unsure whether every Q_ASSERT I put in my code is actually correct. So I would like to test them, which is easy for the positive case (assertion passed), of course, because the function-under-test returns normally. For the negative case, though, where an assertion would fail, I need to place the test into a separate executable, compile and run it, and verify that it exited abnormally (and even then I could just hit an unrelated crash, so I'd also need to parse the output of the executable to look for the assertion failure signature).
It would be nice if there was a mode where Q_ASSERT would just throw an exception, say QAssertionFailed, instead of calling std::abort().
Attachments
Issue Links
- relates to
-
QTBUG-132947 Geometry classes may have unsound `noexcept` on their methods
-
- Reported
-
Gerrit Reviews
For Gerrit Dashboard: QTBUG-98965 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
618097,4 | Long live Q_PRE/Q_PRE_X! | dev | qt/qtbase | Status: MERGED | +2 | 0 |
620580,9 | Geometry classes: introduce check for overflows | dev | qt/qtbase | Status: ABANDONED | 0 | -1 |
621931,11 | Geometry classes: introduce check for overflows | dev | qt/qtbase | Status: MERGED | +2 | 0 |
631160,2 | Long live Q_PRE/Q_PRE_X! | 6.9 | qt/qtbase | Status: MERGED | +2 | 0 |
631231,2 | Long live Q_PRE/Q_PRE_X! | 6.8 | qt/qtbase | Status: MERGED | +2 | 0 |
631401,3 | Long live Q_PRE/Q_PRE_X! | tqtc/lts-6.5 | qt/tqtc-qtbase | Status: MERGED | +2 | 0 |