Phil Nash
3bc03cd617
Went back to Catch 1.x behaviour for -d
...
-d takes "yes" or "no", rather than being a standalone flag option. The default is "defaultForReporter" so the previous change actually dropped some control.
2017-08-18 15:53:10 +01:00
Martin Hořeňovský
24af32f378
Add define that pulls in reporter and listeners interfaces
...
This allows users to define reporters and listeners in files different
from the main file.
Related to #991 , #986
2017-08-17 20:23:30 +02:00
Phil Nash
0545de0a31
Hold translated exception in local string while matching
2017-08-17 19:21:00 +01:00
Martin Hořeňovský
597fca3c89
Remove <algorithm> header from the common path
...
It was only used for std::max<double> within Approx, so we now have
::Catch::Detail::max(double, double) that is used instead.
2017-08-17 20:04:53 +02:00
Martin Hořeňovský
f99f511155
Removed *_REGISTER_REPORTER from main path
...
Also simplified them to single macro: CATCH_REGISTER_REPORTER
2017-08-17 20:03:16 +02:00
Martin Hořeňovský
9a18ba042f
Remove deprecated listener registration macro
2017-08-17 20:03:16 +02:00
Martin Hořeňovský
8e6641c19b
Replace stdint.h include with cstdint include
...
Just small unification of includes
2017-08-17 20:03:16 +02:00
Phil Nash
aaedae60b4
Fixed issue with comparing non-copyable values
2017-08-17 16:46:05 +01:00
Phil Nash
8582780f11
Don't include string/ vector matchers if CATCH_CONFIG_MATCHERS defined
2017-08-16 14:38:04 +01:00
Phil Nash
a36395e2ff
Changed use of strncpy to memcpy
2017-08-15 23:47:52 +01:00
Phil Nash
699e571400
Documented benchmark-resolution-multiple command line option
...
- and increased default to 100
2017-08-15 19:51:22 +01:00
Phil Nash
917a51da6b
Added libidentify support, including option for waiting for keypress on exit (and/ or start)
2017-08-15 13:48:14 +01:00
Phil Nash
7be258536e
Suppress strncpy copy warnings on MSVC
2017-08-14 12:12:28 +01:00
Phil Nash
94d347b059
Removed StringData
2017-08-14 09:14:49 +01:00
Phil Nash
3772f69f0f
Removed String and StringBuilder
2017-08-14 09:04:14 +01:00
Phil Nash
ece64c3b3a
Removed redundant .c_str()s from StringRef usages
2017-08-14 08:54:57 +01:00
Phil Nash
fa3535e95e
Added << ostream overload to StringRef
2017-08-14 08:50:44 +01:00
Phil Nash
c659e0fd3d
StringRef conversions to/ from std::string
2017-08-14 08:39:14 +01:00
Phil Nash
eed4ae86ad
Added config to control multiple of clock resolution to run benchmark iterations for
2017-08-11 22:24:52 +01:00
Phil Nash
684cbb2631
Fixes issue with fatal errors and non-failing assertions
...
Fixes #990
2017-08-10 17:10:13 +01:00
Phil Nash
97c06ca6fb
Merge branch 'reevaluate' into dev-modernize
2017-08-10 16:18:05 +01:00
Martin Hořeňovský
11295a2663
Make catch_stream.hpp a standard .cpp file
2017-08-10 11:45:05 +02:00
Martin Hořeňovský
aa42dd92d1
Merge branch 'master' into dev-modernize
2017-08-10 11:34:26 +02:00
Martin Hořeňovský
7e4038d848
Capture std::clog writes and combine them with std::cerr writes ( #989 )
...
This also introduces Catch::clog() method to allow embedded targets
to override std::clog usage with their own stream (presumably null-sink),
similarly to how Catch::cout() and Catch::cerr() are used.
Fixes #989
2017-08-09 15:28:40 +02:00
Phil Nash
ee9b19efd3
Moved matcher-based capture macros into their own file
...
- this file excluded from the CATCH_CONFIG_DISABLE_MATCHERS path.
- matchers are always compiled in to the impl file
- _THROWS_WITH macros are still available with matchers disabled - but only the ones that take a string
- tests that use matchers have #ifdefs, so the whole SelfTest project can compile with matchers disable.
2017-08-09 12:10:14 +01:00
Phil Nash
b59e0ed48a
Collapsed alternate capture macros now originals are redundant
2017-08-09 11:36:33 +01:00
Phil Nash
8d21b4a916
Removed some unnecessary #includes
...
- and don't #include "catch_debugger.h" in the header path when CATCH_CONFIG_FAST_COMPILE is defined
2017-08-09 10:51:50 +01:00
Phil Nash
4b5ac4d3d9
Actually do what the previous commit claimed to do!
...
:-s
2017-08-09 10:29:05 +01:00
Phil Nash
8382d99081
Workaround for GCC 4.8 "deleted ctor in aggregate" bug
2017-08-09 10:18:31 +01:00
Phil Nash
dc1df297e3
Suppressed some warnings
...
- signed/ unsigned mismatches
- virtual destructor on ITransientExpression (even though not needed)
2017-08-09 09:29:44 +01:00
Phil Nash
8c95a81448
Removed all (well, most) of the redundant, ResultBuilder-based, code
2017-08-09 09:08:33 +01:00
Phil Nash
7df290dfc1
Integrated new AssertionHandler into unexpected exception handling in RunContext
2017-08-09 08:49:59 +01:00
Phil Nash
201028d6ec
Integrated INTERNAL_CATCH_THROWS with new AssertionHandler
2017-08-09 00:52:20 +01:00
Phil Nash
27fd8f80bd
Integrated INTERNAL_CATCH_THROWS_STR_MATCHES with new AssertionHandler
2017-08-09 00:44:30 +01:00
Phil Nash
ef4fa56b71
integrated INTERNAL_CATCH_THROWS_MATCHES with new AssertionHandler
2017-08-08 23:41:55 +01:00
Phil Nash
9668410b8e
integrated INTERNAL_CHECK_THAT with new AssertionHandler
2017-08-08 23:31:43 +01:00
Phil Nash
2832e23aa9
Restored exceptionGuard functionality under CATCH_CONFIG_FAST_COMPILE
2017-08-08 21:07:30 +01:00
Phil Nash
5f91724368
integrated AssertionHandler into INTERNAL_CATCH_MSG
2017-08-08 20:17:09 +01:00
Phil Nash
8a97beece2
integrated AssertionHandler into INTERNAL_CATCH_THROWS_AS
2017-08-08 19:43:07 +01:00
Phil Nash
f033f4f184
integrated AssertionHandler into INTERNAL_CATCH_NO_THROW
2017-08-08 19:36:18 +01:00
Phil Nash
f247ce5bff
First cut of new AssertionHandler/ Decomposer
...
- integrated into INTERNAL_CATCH_TEST. Needs more work to fully replace existing stuff
2017-08-08 17:53:01 +01:00
Phil Nash
f8148ebae1
Made macroName and capturedExpression StringRefs
2017-08-08 01:22:21 +01:00
Phil Nash
59f9bcf1ed
Reduced AssertionInfo to a pure record type
2017-08-08 01:08:07 +01:00
Phil Nash
5e60050299
Removed default ctors for AssertionInfo, AssertionResult and SourceLineInfo
2017-08-08 01:02:24 +01:00
Phil Nash
e658bacb04
Refactored how FAST_COMPILE affects internal test macros (less duplication)
2017-08-07 00:09:54 +01:00
Phil Nash
3a409e9fd4
Suppress more signed/ unsigned mismatches during Evaluator calls on MSVC
2017-08-06 00:38:03 +01:00
Phil Nash
63392e095e
Refactored Evaluator templates to only be specialised on Op, with Lhs/Rhs types templated on method instead
2017-08-06 00:29:37 +01:00
Phil Nash
0a2ce87d32
Removed compare layer from expression evaluation
2017-08-06 00:13:00 +01:00
Phil Nash
b3b29f4b4c
Use size_t for String size types
2017-08-05 22:53:21 +01:00
Phil Nash
cff3818e68
Correctly handle special tags that also imply being hidden (!benchmark)
2017-08-05 22:24:17 +01:00
Phil Nash
519db85758
Report benchmark durations in natural units
...
(and extended StringRef to be able to report utf8 char lengths
2017-08-05 21:41:56 +01:00
Phil Nash
4421672fb8
Removed benchmark tests from approval tests (for now)
2017-08-05 11:26:20 +01:00
Phil Nash
97d6b08087
Changed clock resolution estimator to return uint64_t
2017-08-04 21:31:28 +01:00
Phil Nash
a9b6813ad9
First draft of (experimental) benchmarking support
2017-08-04 19:23:30 +01:00
Phil Nash
a1e3f0b624
Moved Timer impl back to cpp
...
(I thought it wasn't included on the non-main path, but it is)
2017-08-04 13:53:47 +01:00
Phil Nash
39d37d9f34
Timer resolution is now nanoseconds
2017-08-04 12:22:16 +01:00
Phil Nash
c7028f7bc7
Made most of Timer class inline - and export getCurrentMicrosecondsSinceEpoch()
2017-08-04 12:16:05 +01:00
Phil Nash
5450de2acd
Added some missing override
s and removed some virtual
s from overrides
2017-08-04 12:13:58 +01:00
Martin Hořeňovský
3882ac1a19
Include proper exception header in enforce.h
2017-08-02 00:26:52 +02:00
Martin Hořeňovský
e8b785b177
Fixup bad merge in 2212cdfe
2017-08-02 00:04:26 +02:00
Anton Vorobyev
eab56d6656
Initial support for native IBM i ILE C++ ( #976 )
...
* - Initial support for native IBM i ILE C++
Signed-off-by: zeromem <zeromem2@gmail.com>
2017-08-01 22:49:27 +02:00
Neal Coombes
2212cdfe26
Eliminate some work when results won't be reported.
2017-08-01 22:49:27 +02:00
Martin Hořeňovský
249bf116e8
Route all T* comparisons through const void* comparisons
...
This should stop the evaluate machinery from instantiating all the
templates for every ptr type that is compared, instead generating it
for single one.
2017-08-01 22:09:32 +02:00
Martin Hořeňovský
6d4673505d
Add missing <algorithm> include in catch_approx.hpp
2017-08-01 22:02:00 +02:00
Martin Hořeňovský
85e14c5fb5
Move some compile-time dispatch to runtime
...
The runtime performance is likely to be negligible,
but compile times need every improvement they can get.
2017-08-01 21:58:09 +02:00
Martin Hořeňovský
feca97dfde
Split out internal error macros from the common path
2017-08-01 18:46:33 +02:00
Martin Hořeňovský
c815ad1d53
Fix fwd declaration of IConfig in catch_test_case_registry_impl.hpp
2017-08-01 17:52:02 +02:00
Martin Hořeňovský
d4e796c138
Move Section(End)Info bodies to proper .cpp file
2017-08-01 17:51:32 +02:00
Martin Hořeňovský
7575749e56
Fix compilation error on older compilers
2017-08-01 17:21:06 +02:00
Martin Hořeňovský
8a2ff20982
Address some of the Resharper finds for Catch 1
...
Closes #957 as the other findings are mostly noise that is pointless
to fix in a branch that will be soon EoLd.
2017-07-31 12:31:45 +02:00
Anton Vorobyev
d3377c791d
Initial support for native IBM i ILE C++ ( #976 )
...
* - Initial support for native IBM i ILE C++
Signed-off-by: zeromem <zeromem2@gmail.com>
2017-07-31 10:47:42 +02:00
Martin Hořeňovský
0a3f899d6a
Move windows.h reduction logic into windows.h proxy header
...
Fixes #965 (at least the primary problem, the separate warnings can
be taken care of later)
2017-07-31 08:36:39 +02:00
Martin Hořeňovský
d08e31d89e
Fix inverted CATCH_CONFIG_DISABLE_MATCHERS toggle
2017-07-29 08:43:32 +02:00
Martin Hořeňovský
0ca4cfb743
Introduce compile time toggle to remove Matchers from TU
...
The toggle is `CATCH_CONFIG_DISABLE_MATCHERS` and the only use is
to speed up compilation of small TUs. For large ones it is likely
insignificant, because the speed up is constant relative to
number of tests/assertions in TU.
2017-07-28 21:34:34 +02:00
Martin Hořeňovský
d01fe03ba6
Removed <algorithm> include from the main path
2017-07-28 15:11:05 +02:00
Martin Hořeňovský
287cc92b2c
Remove <set> include from the common test path
2017-07-27 22:31:27 +02:00
Martin Hořeňovský
446bad752f
Move std::exception_ptr out of interfaces
2017-07-27 12:24:52 +02:00
Martin Hořeňovský
307eeefa8f
Change typedefs to using
2017-07-27 12:24:21 +02:00
Martin Hořeňovský
33fd54a673
Split Option<T> and TagAlias definitions away from the main include path
2017-07-27 11:55:30 +02:00
Martin Hořeňovský
5ebbec7dab
Move all stringref function bodies out of line
2017-07-27 11:32:04 +02:00
Martin Hořeňovský
a40add3153
Clean up Approx to take arguments by const&
2017-07-27 11:32:04 +02:00
Martin Hořeňovský
ab0f1dcde9
Remove superfluous include
2017-07-27 11:32:03 +02:00
Martin Hořeňovský
a75eaa3c5a
Split out more headers into separate .cpp files
2017-07-27 11:32:02 +02:00
Martin Hořeňovský
9de729b515
General cleanup
2017-07-27 11:32:01 +02:00
Martin Hořeňovský
1a96175bb2
Split out helper functions on std::string from catch_common.h
2017-07-25 21:57:35 +02:00
Martin Hořeňovský
1e59ccee41
Addressed Resharper-C++ warnings
...
See #958
2017-07-25 17:16:28 +02:00
Martin Hořeňovský
b6f62af7d1
Address more of PVS studio warnings
2017-07-25 15:45:50 +02:00
Phil Nash
46bf7605f4
Hold exception translators by unique_ptr
...
- and removed range deleters
2017-07-20 23:50:07 +01:00
Phil Nash
cb6963216f
Removed catch_section_info.cpp (not used)
2017-07-20 23:49:03 +01:00
Phil Nash
c91639e1d7
Use Columns to format reporter list
2017-07-20 23:32:35 +01:00
Phil Nash
3a37f45a97
Removed tbc_text_format (superceded by TextFlow)
2017-07-20 23:20:42 +01:00
Phil Nash
224250e2d4
listTests now only uses TextFlow (not tbd_text_format) again
2017-07-20 20:10:13 +01:00
Phil Nash
f0890dcdf8
removed redundant virtuals on override functions (and added a couple of overrides)
2017-07-20 16:23:52 +01:00
Martin Hořeňovský
87a66b8479
Address results of PVS-Studio static analysis
...
Couple are left un-addressed, see #958 for details.
2017-07-20 00:27:28 +02:00
Martin Hořeňovský
cf2678dce6
Merge branch 'dev-better-verbosity' of https://github.com/BMBurstein/Catch
2017-07-19 23:17:19 +02:00
Martin Hořeňovský
efd79aa0bd
Extend exception type in _THROWS_ with const& unconditionally
...
Potentially breaking change, but most people apparently were using it
wrong and thus it won't be breaking for them.
Closes #955
2017-07-19 21:30:00 +02:00
Martin Hořeňovský
4a1e898eae
More method bodies moved out of line
2017-07-19 15:32:58 +02:00
Martin Hořeňovský
d7ff62430a
Removed superfluous inline specifications
2017-07-19 13:40:00 +02:00
Martin Hořeňovský
edbe122761
Split out non-templated Approx methods into cpp file
2017-07-19 13:40:00 +02:00
Martin Hořeňovský
7a22bad763
Addressed some static analysis warnings
...
Based on findings in #957
2017-07-19 09:50:08 +02:00