Phil Nash
f193698fb3
Removed all (that I could find) redundant second macro args to TEST_CASE and SECTION
...
- now we can rely on variadic macros
2017-07-13 09:20:37 +01:00
Martin Hořeňovský
91c1556078
Moved Catch NotImplementedException out of the common include path
...
We could probably toss it away completely, currently it is used
only by TeamCity reporter.
2017-07-12 15:05:01 +02:00
Martin Hořeňovský
33ed1773f4
Reworked stringification layer, removed Catch::toString
...
Now the order of stringification checks is
1) StringMaker specialization
2) operator<<
toString overloads and specializations have been removed.
2017-05-02 23:51:03 +02:00
Martin Hořeňovský
71df66365e
Gutted catch_compiler_capabilities
...
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
2017-04-25 12:43:19 +02:00
Martin Hořeňovský
cdd83c2e15
Fmt and tag fixup for #876
...
Github wouldn't let me push to the PR, probably because it was made from
fork of a fork...
2017-04-04 11:31:13 +02:00
dvirtz
9a07dde16d
print messages when unexpected exceptions are thrown
2017-04-04 11:27:19 +02:00
Martin Hořeňovský
8b8e3ee117
Disable C4702 in Exception tests self tests
...
VS 2015 in Release mode sees through our indirection and complains.
There is no reason to make the indirectoin harder to reason about,
instead of just disabling the warning.
2017-03-06 10:52:21 +01:00
Martin Hořeňovský
c390c4cb9f
Fixed inconsistent and trailing whitespace
...
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
2017-01-26 23:13:12 +01:00
Phil Nash
6c23a6582b
Mark CHECKed-throw test as [failing]
2017-01-24 09:53:04 +00:00
Phil Nash
7bcb42496d
Changed exception tests to allow for now throw-from-CHECK behaviour
2017-01-23 17:56:41 +00:00
Phil Nash
722315a1f5
Removed some trailing whitespace
2015-12-04 10:20:33 +00:00
Phil Nash
d274fc571c
Added noexcept to CustomStdException destructor
2015-11-20 17:09:48 +00:00
Phil Nash
a49f088032
exception translators considered even for types deriving from std::exception, now
...
- also added docs for exception translators
- updated approvals
2015-11-18 08:39:21 +00:00
Phil Nash
e91738103c
Stripped trailing whitespace from all source code lines
...
(replaces need for PRs #310 and #504 )
2015-11-04 18:04:15 +00:00
Phil Nash
72868920bb
Exception message assertions now work with matchers
2015-07-15 23:02:25 +01:00
Phil Nash
2104ca2aa4
Exception message testing now supports wildcards
...
- extracted WildcardPattern from TestSpec::NamePattern
2015-07-13 15:03:04 +01:00
Phil Nash
85de743d70
Added _THROWS_WITH macros
...
- asserts on exception message
2015-07-13 06:34:41 +01:00
Phil Nash
9438a03d5b
Big assertion capture refactoring.
...
- moved as much logic out of the macros as possible
- moved most logic into new ResultBuilder class, which wraps ExpressionResultBuilder (may take it over next), subsumes ResultAction and also takes place of ExpressionDecomposer.
This introduces many SRP violations - but all in the name of minimising macro logic!
2014-05-28 18:53:01 +01:00
Phil Nash
5a2df71b41
build 42: “compact” reporter
...
- thanks to Martin Moene
2014-05-01 19:07:02 +01:00
Phil Nash
1bccc03213
Secondary fix for #270 (addresses same issue with CHECK)
2014-04-12 19:20:46 +01:00
Phil Nash
a176b93738
Fix for #270 (REQUIRE continues if test throws an exception).
...
Added test case that reproduced the bug then applied the fix.
2014-04-12 19:07:24 +01:00
Phil Nash
ca7292e3a7
Removed redundant MetaTestRunner
2013-11-19 19:03:11 +00:00
Phil Nash
337dc25ed7
Converted all test case names to "modern" style (freeform text + tags)
2013-11-19 07:21:03 +00:00
Phil Nash
bf37e6879a
Removed use of compiler specific techniques for denoting non-returning functions
...
- use if( Catch::isTrue( true) ) to guard throws instead
2013-04-23 20:52:49 +01:00
Phil Nash
2666c96d4e
Fixes issue #164
...
- Removed spurious (re-)throw when catching unexpected exception
2013-04-20 21:04:32 +01:00
Phil Nash
2e3c5fa2ad
Addressed some warnings (mostly MSVC)
2013-03-25 08:46:48 +00:00
Phil Nash
0db35c0f35
Cleaned up -Wpadded warning handling a bit more
2013-03-13 08:18:30 +00:00
Phil Nash
10ed1e0e34
Handle section ends in the event of unexpected exceptions
2013-02-19 19:45:09 +00:00
Phil Nash
209e89bcb9
Removed some more test cruft
2012-12-01 19:09:01 +00:00
Phil Nash
37ce023a30
Removed mocked output logging tests in favour of approval tests
2012-12-01 09:13:36 +00:00
Phil Nash
d0cc33f284
Unchecked exceptions don't report previous assertions message (only its line number)
2012-11-17 17:22:37 +00:00
Phil Nash
b323fc7e6c
Fixed line/no regression for SECTIONs
...
Unexpected exceptions within a section now get the SECTION's line no. again (instead of TEST_CASE line/no)
2012-11-04 21:39:16 +00:00
Phil Nash
d5fbe2ec5d
conditionally compile GCC pragmas
2012-08-16 20:35:52 +01:00
Phil Nash
cda21492a8
Conditionally compile clang pragmas
2012-08-16 18:47:41 +01:00
Phil Nash
a695eb9006
Builds almost completely cleanly with -WEverything in LLVM
2012-08-13 07:46:10 +01:00
Phil Nash
abf271672f
Added NotImplementedException
2012-07-05 18:37:58 +01:00
Phil Nash
5824b56a5e
Cleaned up some GCC/LLVM warnings
2012-06-05 10:38:18 +01:00
Phil Nash
b213202ad7
Added self-test for section ordering
...
Added MockReporter for tracking test runs.
Added intrusive smart pointer. Config holds reporter by smart pointer, so we can route the mock reporter through multiple test runs
2012-05-04 07:55:11 +01:00
Phil Nash
7b449f7abe
Ability to register line# for testing
...
Factored file/ line storage and formatting into common class.
Used in a static registry so failure messages can be asserted to have the file/ line in.
2012-02-15 08:20:06 +00:00
Phil Nash
823ea3efd4
Re-org
2011-04-26 08:32:40 +01:00