All C++11 toggles are now removed. What is left is either platform
specific (POSIX_SIGNALS, WINDOWS_SEH), or possibly still needed
(USE_COUNTER).
If current CLion is compatible with `__COUNTER__`, then we should also
force `__COUNTER__` usage.
Changed
* CATCH_AUTO_PTR -> std::unique_ptr
* CATCH_OVERRIDE -> override
* CATCH_NULL -> nullptr
* CATCH_NOEXCEPT -> noexcept
* CATCH_NOEXCEPT_IS -> noexcept
Removed
* CATCH_CONFIG_CPP11_UNIQUE_PTR
* CATCH_CONFIG_CPP11_SHUFFLE
* CATCH_CONFIG_CPP11_TYPE_TRAITS
* CATCH_CONFIG_CPP11_OVERRIDE
* CATCH_CONFIG_CPP11_LONG_LONG
* CATCH_CONFIG_CPP11_TUPLE
* CATCH_CONFIG_CPP11_IS_ENUM
* CATCH_CONFIG_CPP11_GENERATED_METHODS
* CATCH_CONFIG_CPP11_NOEXCEPT
* CATCH_CONFIG_CPP11_NULLPTR
* CATCH_CONFIG_VARIADIC_MACROS
In some cases, like when given
```cpp
std::vector<char>* str =
reinterpret_cast<std::vector<char>*>(0x1234458);
CHECK(*str == std::vector<char>());
```
reconstructing the expression to report it would cause another fatal
error. Instead we just put together an AssertionResult without
reconstructing the expression fully.
This should fully fix#810
Some versions of MinGW do not support enough of Win32 API to let us work
with SEH, so SEH is now MSVC only (+ configurable toggle).
Also made use of gmtime_s MSVC only (as oposed to Windows only).
Fixes#805
Because the signal changes were in a different branch from the windows.h
related changes, the SEH handling code included the header directly.
Fixes#803
This means that all tabs used in indentation are now 4 spaces and that
there should be no more trailing whitespace.
Ill also look into creating a pre-commit hook that will prevent this
from happening in the future.
Fixes#105
This fixes the case when we pass signal to previously registered
handler, and it needs to transform the signal into different one.
Still problematic: What if the signal handler we replaced does not
terminate the application? We can end up in a weird state and loop
forever.
Possible solution: Deregister our signal handlers, CALL the previous
signal handler explicitly and if control returns, abort. This would
however complicate our code quite a bit, as we would have to parse the
sigaction we delegate to, decide whether to use signal handler or signal
action, etc...
Only some "signals" are handled under Windows, because Windows does not
use signals per-se and the mechanics are different. For now, we handle
sigsegv, stack overflow, div-by-zero and sigill. We can also
meaningfully
add various floating point errors, but not sigterm and family, because
sigterm is not a structured exception under Windows.
There is also no catch-all, because that would also catch various
debugger-related exceptions, like EXCEPTION_BREAKPOINT.
Also stops Catch from assuming its the only signal user in the binary,
and makes it restore the signal handlers it has replaced. Same goes for
the signal stack.
The signal stack itself probably shouldn't be always reallocated for
fragmentation reasons, but that can be fixed later on.
- based on PR 232 (https://github.com/philsquared/Catch/pull/232 - thanks Lukasz Forynski)
- Writes to reporter, so gets all the usual context, but then exits directly (since the stack cannot be resumed) so no summary
- On Windows does nothing, as yet.