Martin Hořeňovský
7b13a8f85a
Move debug break out of tests, speeds up compilation time
...
This is hidden behind CATCH_CONFIG_FAST_COMPILE
2017-02-14 15:35:12 +01:00
Phil Nash
2081caa452
Import MatcherBase to Catch namespace
2017-02-14 09:16:54 +00:00
Phil Nash
a5a013811c
Renamed toStringUncached -> describe
2017-02-14 09:16:54 +00:00
Phil Nash
1400127d6f
Extracted string matchers impl into cpp that is only compiled into main TU
2017-02-14 09:16:54 +00:00
Phil Nash
7fed25ad1f
New Matchers implementation
...
- simpler
- less templates and machinery
- no cloning, copying or unnecessary heap allocations
- better factored
2017-02-14 09:16:54 +00:00
Phil Nash
d08cee288f
v1.7.2 build
2017-02-13 16:15:42 +00:00
Phil Nash
873ef276b6
XML Reporter closes tag and flushes stream at end of TestCase and Section tags.
...
This fixes an issue where XML reports on stdout are broken by printf statements
2017-02-13 15:56:25 +00:00
Martin Hořeňovský
bc68b9f454
More include simplifications
2017-02-13 14:12:22 +01:00
Phil Nash
67d513aa73
Removed single char contains()
...
- had incorrect prototype anyway
2017-02-13 08:20:45 +00:00
Phil Nash
9a3486a705
Replaced use of dynamic_cast with static_cast.
...
It wasn't necessary anyway.
This addresses #821
2017-02-12 22:00:17 +00:00
Martin Hořeňovský
50dee9ae57
Fixed typo in CLI error reporting
2017-02-12 13:50:15 +01:00
Martin Hořeňovský
b2a6fe971b
Couple more includes cleaned out
2017-02-12 12:48:25 +01:00
Martin Hořeňovský
9012f95964
Moved some std includes out from catch_common.h
2017-02-12 12:17:07 +01:00
Martin Hořeňovský
d0620c3495
Added std:: qualification to some functions from C stdlib
...
This should solve #543 , once Clara changes are in as well.
2017-02-11 23:20:09 +01:00
Phil Nash
005787f1c5
Marked IConfig implementations in Config CATCH_OVERRIDE
...
(silences warnings)
2017-02-10 22:39:27 +00:00
Martin Hořeňovský
f75a511b5c
Fix MSVC /analyze warning about inconsistent annotations
2017-02-10 17:12:41 +01:00
Martin Hořeňovský
73159ace3d
REQUIRE_THROWS_AS now catches exception by const&
...
Prevents some warnings caused by catching complex types by value.
Closes #542
2017-02-09 12:57:01 +01:00
Martin Hořeňovský
9952dda524
REQUIRE_THROWS_AS is now reported with expected type as well
...
Also updated tests to reflect this change.
2017-02-09 12:51:43 +01:00
Martin Hořeňovský
e543cc0646
Removed an obsolete file that somehow got into the previous master.
2017-02-09 11:12:25 +01:00
Martin Hořeňovský
a38ccec33a
Added 3rd party bug to documentation
2017-02-08 20:53:39 +01:00
Phil Nash
97d8003a71
XmlWriter can specify a stylesheet
...
Provide an extension point on XmlReporter to be able to supply a stylesheet url in a derived implementation
2017-02-07 23:09:43 +00:00
Phil Nash
1f271c9944
XmlWriter reverts to XML 1.0.
...
Character encodings that are not valid in XML 1.0 are instead written using C-style escapes
2017-02-07 22:48:06 +00:00
Martin Hořeňovský
7b8a27eadb
v1.7.1 build
2017-02-07 10:06:52 +01:00
Phil Nash
2b74613c54
Revert "First cut of Evaluate refactoring to remove int specialisations, among other things"
...
This reverts commit 39753558eb
.
2017-02-06 22:37:23 +00:00
Martin Hořeňovský
23600609c0
Deregister SEH handler before reporting SE.
2017-02-06 20:40:46 +01:00
Martin Hořeňovský
4feb2dbb50
Removed const qualification to disambiguate between operator overloads
2017-02-06 20:39:32 +01:00
Phil Nash
84af6bc955
XmllWriter flushes the stream after every endElement now
2017-02-06 16:25:36 +00:00
Phil Nash
88b760276d
Revert "XmlWriter reverts to XML 1.0."
...
This reverts commit a189387f49
.
2017-02-06 16:21:01 +00:00
Phil Nash
a189387f49
XmlWriter reverts to XML 1.0.
...
Character encodings that are not valid in XML 1.0 are instead written using C-style escapes
2017-02-06 16:00:05 +00:00
Phil Nash
39753558eb
First cut of Evaluate refactoring to remove int specialisations, among other things
2017-02-06 15:15:43 +00:00
Martin Hořeňovský
e991c006b7
Fixes for MinGW compatibility
...
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
2017-02-06 01:43:53 +01:00
Martin Hořeňovský
712323ab7c
Include windows.h proxy header, instead of windows.h itself
...
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
2017-02-03 14:09:17 +01:00
Martin Hořeňovský
ce37f48ffa
v1.7.0 build
2017-02-01 21:47:43 +01:00
Martin Hořeňovský
f58ff0c540
Remove \l, add \f in character pretty printing
...
I have never head of \l and MSVC warns about unknown escape sequence, so
I changed it into \f that definitely exists and potentially might be
useful.
2017-02-01 21:31:14 +01:00
Phil Nash
b524fa7cd8
Fixed bugs in escape char handling in test names
...
1. If escape char is first char, sets start of range
2. Multiple escape chars are handled (offsets chars to remove)
2017-02-01 14:13:20 +00:00
Eric Schmidt
5121b5b058
Put quote marks around printed characters; also nicely print some escapes
2017-01-31 21:53:36 +01:00
Jan Včelák
1e5176bd69
Cap main exit code to 255 ( #797 )
...
Changed default main to clamp exit code to 8 bits because of POSIX limitations.
Updated documentation about declaring non-default main.
2017-01-31 20:48:14 +01:00
Martin Hořeňovský
0dabd951ba
expr is now cast to void in THROWS family of assertions.
...
This prevents Clang from complaining about unused value in expressions
containing explicit casts used in the THROW assertion macro family.
Example:
`REQUIRE_THROWS_AS(static_cast<bool>(object), std::bad_cast);` would
trigger `-Wunused-value` warning. Now it does not.
Credits to Arto Bendiken, who submitted a PR almost 3 years ago, but his
branch has since died and I was unable to merge it.
2017-01-31 18:02:11 +01:00
Josef Kemetmueller
70d3c937c3
Enable breaking into debugger on Mac
...
The integrated assembler segment was missing an underscore:
"_asm__". Also we remove the "DEBUG" macro check, so we are consistent
with the linux and windows variant.
Now breaking into gdb on failure should work via:
gdb --args test_executable --break
2017-01-31 16:00:42 +00:00
Martin Hořeňovský
38af8d7035
Fixed SEH deregistration on Windows
...
Should fix #796
2017-01-30 19:54:16 +01:00
Martin Hořeňovský
615aa071a8
Merge branch 'dev-performance-round2'
2017-01-30 13:02:48 +01:00
Martin Hořeňovský
15816c5760
Revert "use sizeof(expr) for unevaluated syntax check"
...
Using sizeof(expr) can trigger a compile-time error,
"lambda expressions are not allowed in an unevaluated context", when passing
expression containing lambda, like a std algorithm. This error is considered
a standard defect, as it is meant to prevent lambdas in decltype
or templates, but not in sizeof.
This reverts commit 227598af47
.
2017-01-30 11:56:29 +01:00
Martin Hořeňovský
bcaa2f9646
Use char literal instead of string literal with 1 char
...
In reality, this is a relatively small performance improvement,
especially with the previous improvements removing lots of superfluous
string handling, but still was measurable.
2017-01-29 23:07:15 +01:00
Martin Hořeňovský
60f8ebec49
Use const char* for filename in SourceLineInfo
...
This is sane, because those `const char*`s are given to us by compiler,
from the text area and thus we do not have to manage their lifetimes. We
also never want to change them.
Also moved copy constructor to compiler-generated methods, not sure why
it wasn't -- even before it was the same as a compiler would generate.
2017-01-29 22:03:27 +01:00
Alexander Ryabykin
02a69b449f
Compilation warnings fix ( #791 )
...
* Compilation warnings fix
* Removed unused argument from reportFatal function
2017-01-27 09:32:58 +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
Martin Hořeňovský
60a9ac7e65
Enabled previous commit under MSVC, introduced new feature toggle
2017-01-26 18:47:29 +01:00
Jonathan Coe
c06afe438e
Add support for comparison of Approx with strong typedefs
...
closes #652
2017-01-26 18:44:03 +01:00
Martin Hořeňovský
4ce11d63a6
Merge branch 'dev-performance'
2017-01-25 22:56:36 +01:00
Martin Hořeňovský
83f4b39680
Added benchmark for previous commit, added iterations to failure bench.
2017-01-25 22:39:43 +01:00
Martin Hořeňovský
b1171bd1f2
Merge branch 'dev-signals'
2017-01-25 22:09:52 +01:00
Martin Hořeňovský
184865358c
CHECK no longer stops running SECTION on exception.
...
This seems to be much closer to desired behaviour than the current one, where
CHECK(false) lets the execution continue, but CHECK(<throws>) does not.
2017-01-23 17:52:17 +00:00
Phil Nash
31c23b9489
Added [!nonportable] tag
2017-01-23 17:44:55 +00:00
Phil Nash
1efd8d3067
Added missing <iterator> #include
2017-01-23 15:19:42 +00:00
Phil Nash
e7bcbb35c0
First cut of -c/—section option for running specific sections
2017-01-23 12:36:03 +00:00
Martin Hořeňovský
9a56609569
v1.6.1 build
2017-01-20 12:49:59 +01:00
Mickey Rose
227598af47
use sizeof(expr) for unevaluated syntax check
2017-01-19 21:25:27 +01:00
Martin Hořeňovský
ee0ca512ea
Force short-circuited evaluation for types that have overloaded &&.
...
This fixes #574 .
2017-01-17 23:31:03 +01:00
Martin Hořeňovský
2e87f8e328
Merge branch 'windows-header-defines' of https://github.com/horenmar/Catch
2017-01-16 17:00:43 +01:00
Martin Hořeňovský
afe46ff270
Extracted NOMINMAX and WIN32_LEAN_AND_MEAN guards into a proxy header
2017-01-16 16:52:44 +01:00
Phil Nash
c65aeaf25f
Clean up generator state
2017-01-16 10:34:16 +00:00
Phil Nash
750b52b814
suppress use of __COUNTER__ when being parsed by CLion (or AppCode).
2017-01-16 10:34:16 +00:00
Vadim Zeitlin
e1c4a4bd9b
Use inline assembly with gcc under Linux for CATCH_TRAP
...
This is more convenient than using the generic portable raise(SIGTRAP) as it
avoids having another stack frame in the debugger when the break happens.
2017-01-15 19:29:34 +01:00
Vadim Zeitlin
25d017763b
Refactor CATCH_BREAK_INTO_DEBUGGER() to avoid repetition
...
Don't duplicate Catch::isDebuggerActive() check many times, do it just once
in CATCH_BREAK_INTO_DEBUGGER() definition and use a separate CATCH_TRAP()
macro for the really platform-dependent part.
2017-01-15 19:29:34 +01:00
Vadim Zeitlin
b634e592da
Add support for breaking into debugger for Linux
...
Use Linux-specific /proc/$PID/status file to check whether we're being
debugged and a generic raise(SIGTRAP) to actually break into the debugger.
2017-01-15 19:29:34 +01:00
Martin Hořeňovský
3b98a0166f
Various small string usage performance improvements.
...
* Empty strings are now direct constructed as `std::string()`, not as empty string literals.
* `startsWith` and `endsWith` no longer construct new a string. This should be an improvement
for libstdc++ when using older standards, as it doesn't use SSO but COW and thus even short
strings are expensive to first create.
* Various places now use char literal instead of string literals containing single char.
** `startsWith` and `endsWith` now also have overload that takes single char.
Generally the performance improvements under VS2015 are small, as going from short string
to char is mostly meaningless because of SSO (Catch doesn't push string handling that hard)
and previous commit removed most string handling if tests pass, which is the expect case.
2017-01-15 10:05:01 +01:00
Mickey Rose
a1e9b841ff
lazily stringify expressions
2017-01-14 21:56:16 +01:00
Martin Hořeňovský
ffc4a9dc14
If we receive a signal, we re-register ALL previous signal handlers.
...
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...
2017-01-14 15:21:44 +01:00
Martin Hořeňovský
7c8b93eac3
Removed superfluous comments (bad merge after cherry pick).
2017-01-14 15:08:00 +01:00
Phil Nash
40dbdf6cb2
Reset signals immediately after use and re-raise orginal signal instead of just exiting
2017-01-12 17:31:56 +01:00
Martin Hořeňovský
70f43d719b
Added signal handling under Windows.
...
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.
2017-01-12 16:40:14 +01:00
Martin Hořeňovský
a281173099
Fix for sigsegv stack overflow behavior
...
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.
2017-01-12 16:23:55 +01:00
Martin Hořeňovský
b3907a78e1
Added NOMINMAX and WIN32_LEAN_AND_MEAN defines before including windows.h
...
This stops the `windows.h` header from defining `min` and `max` macros
and including lot of Windows APIs that are not needed by Catch.
2017-01-12 16:00:02 +01:00
Phil Nash
3b2f206191
v1.6.0 build - including release notes
2017-01-11 16:44:36 +00:00
Phil Nash
4e4d733f90
Added \ as escape character in test names on the command line - so you can run tests by name when they contain , or [
2017-01-11 16:27:16 +00:00
Phil Nash
b68e8f9a24
Added missing #include so CATCH_CONFIG_COUNTER properly takes into account the current compiler.
...
May address #677 and #435 and others.
2017-01-11 16:27:16 +00:00
Martin Hořeňovský
a1bed572be
Standardize C++11 feature toggles to follow documentation
...
Closes #774
2017-01-10 22:54:57 +01:00
Martin Hořeňovský
6991549457
Fixed compile error under VS2015 /c++:latest, caused by using random_shuffle
...
Now if we detect C++11 compiler, or MSVC in version corresponding to VS2015,
we switch from using `std::random_shuffle` to `std::shuffle`.
`std::random_shuffle` was officially deprecated in C++14, and removed in C++17.
Also removed guarded inclusion of `<random>` header, as there was nothing
in the header that used it.
2017-01-09 23:29:13 +01:00
Phil Nash
5b00fd40ba
Merge pull request #767 from hmich/xml-encoder-extended-ascii
...
Do not encode extended ASCII characters in XML reporter
2017-01-09 18:37:52 +00:00
Jonathan B. Coe
37e1e24309
add support for inequalities
2017-01-08 22:28:53 +01:00
Ross Bencina
7255be28cc
remove concatenation of m_exprComponents.op in if-branch where op has tested empty in previous line
2017-01-07 13:37:08 +01:00
Philipp Claßen
8d1e240700
Fixed shell color code of "Blue"
2017-01-07 10:30:43 +01:00
Igor Akhmetov
8d16d95a99
Do not encode extended ASCII characters in XML reporter
2016-12-26 11:39:19 +00:00
Phil Nash
2be372710e
Build 1.5.9
2016-11-29 12:15:50 +00:00
Martin Hořeňovský
0c8c6b347a
Fixes build error caused by missing include.
2016-11-28 15:47:20 +01:00
Phil Nash
e27c4ee042
Build 1.5.8
2016-10-26 12:08:26 +01:00
Billy Robert O'Neal III
c17ba0870a
Fix transform without a lambda
...
Catch apparently supports targeting C++03, so use an inline function
instead.
2016-10-14 14:28:15 -07:00
Billy Robert O'Neal III
79f01100e3
Fix transform narrowing warnings
...
Catch passes ::tolower into std::transform with string iterators.
::tolower has the signature int(int), which triggers a stealth narrowing
warning inside std::transform, because transform calls
*_Dest = _Fn(*_First), which implicitly narrows an int to a char.
For this particular application the narrowing is fine, so explicitly
narrow in a lambda.
2016-10-14 14:16:21 -07:00
Billy Robert O'Neal III
ccf7f2842a
Fix random_shuffle narrowing warnings
...
Catch passes an RNG which accepts int to random_shuffle. Inside
random_shuffle, the STL tries to call that RNG with the difference_type
of the user provided iterators. For std::vector, this is ptrdiff_t,
which on amd64 builds is wider than int. This triggers a narrowing
warning because the 64 bit difference is being truncated to 32 bits.
Note that this RNG implementation still does not produce a correctly
uniformly shuffled result -- it's currently asserting that std::rand
can produce 1000000 which is false -- but I don't know enough about
how much repeatable shuffles are necessary here, so I'm leaving that
alone for now.
2016-10-14 14:06:45 -07:00
Phil Nash
40f6068d52
Build 1.5.7
2016-09-27 10:46:22 +01:00
Phil Nash
21cbfc107e
--list-test-names quotes test names that start with #
...
- completes #717
2016-09-27 10:43:03 +01:00
Phil Nash
b1eeec7c69
-f supports quoted test names (test name surrounded with " characters).
...
This is the first part to resolving #717
2016-09-27 10:27:28 +01:00
Phil Nash
c23b374f3d
Added braces to emphasise the return logic
2016-09-27 09:58:12 +01:00
nabijaczleweli
8c459dd207
Fix misindent
...
Closes #679
2016-09-27 00:35:26 +02:00
Robert A Zeh
5095619955
Fixes for XML encoding.
...
This commit fixes the following scenario:
* You have a test that compares strings with embedded control
characters.
* The test fails.
* You are using JUnit tests within TeamCity.
Before this commit, the JUnit report watcher fails on parsing the XML
for two reasons: the control characters are missing a semicolon at the
end, and the XML document doesn't specify that it is XML 1.1.
XML 1.0 --- what we get if we don't specify an XML version --- doesn't support embedding control characters --- see
http://stackoverflow.com/questions/404107/why-are-control-characters-illegal-in-xml
for all of the gory details.
This is based on PR #588 by @mrpi
2016-08-24 09:38:24 -05:00
Phil Nash
35f510545d
v1.5.6
2016-06-09 19:21:09 +01:00
Phil Nash
1aa6c91e64
Fixed RNG issue with pre C++14 compilers
2016-06-09 19:07:05 +01:00
Phil Nash
ac220289a6
v1.5.5:
...
Deal with auto_ptr and random_shuffle hard deprecations in C++14
2016-06-09 08:19:23 +01:00
Phil Nash
be3570ef22
Use std::shuffle instead of (deprecated) std::random_shuffle if C++14 detected
2016-06-09 08:15:57 +01:00
Phil Nash
a74d760d74
Switched remaining std::auto_ptrs to use CATCH_AUTO_PTR
2016-06-08 19:14:54 +01:00
Phil Nash
f666f5f0ae
v1.5.4
2016-05-12 19:18:04 +01:00
Phil Nash
7940d58a2f
"test" expression using !! instead of static_cast to bool.
...
This addresses #657 while (hopefully) maintaining fix for #574
2016-05-12 19:17:55 +01:00
Phil Nash
ebf9f3bb9d
v1.5.3
2016-05-10 19:09:59 +01:00
Phil Nash
b57e734eb4
Merge branch 'throw-on-duplicate-tests' of git://github.com/rcdailey/Catch into rcdailey-throw-on-duplicate-tests
2016-05-10 19:06:47 +01:00
Phil Nash
5c198d85e6
v1.5.2
2016-05-07 23:14:04 +01:00
Phil Nash
92b141ee53
v1.5.1
2016-04-28 08:13:00 +01:00
Phil Nash
4f1263d6b4
Removed use of dynamic_cast from test_case_tracker.
...
(Thanks to #631 and #648 )
2016-04-28 08:11:12 +01:00
Phil Nash
3b19458fed
Removed use of dynamic_cast for MultipleReporters
...
(Thanks to #630 , #636 and #648 )
2016-04-28 08:11:12 +01:00
Phil Nash
0fe303b6b7
v1.5.0 (due to new embedded Clara)
2016-04-23 13:25:51 +01:00
Robert Dailey
86c0ea2999
[ #608 ] Don't use exit() on duplicate test descriptions
...
Instead of `exit(1)`, it now throws `std::runtime_error` with the details
of the failure. This exception is handled in `run()` at a higher level where
the log is printed to cerr and the test gracefully exits.
2016-04-01 11:56:51 -05:00
Phil Nash
c984fc3ecd
v1.4.0
...
- use __COUNTER__ for unique IDS instead of __LINE__ (where possible)
+ bug fixes
2016-03-15 07:24:26 +00:00
Phil Nash
447f53e9e3
Fixed !shouldfail
2016-03-14 19:13:34 +00:00
Phil Nash
13a887ad24
Use __COUNTER__ when generating unique names instead of __LINE__, if available.
...
Based on PR #351
2016-03-14 07:55:00 +00:00
Phil Nash
02af70ed0b
build v1.3.6 (include's David Grayson's fix for the gcc pragma)
2016-03-11 18:31:52 +00:00
David Grayson
97e335437e
Fix CATCH_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS: GCC needs to be capitalized.
...
Fixes issue #600 .
2016-03-04 19:24:10 -08:00
Phil Nash
ae5ee2cf63
v1.3.5
2016-02-29 08:17:18 +00:00
Phil Nash
458f37ed57
Merge branch 'explicit-bool-conversion' of git://github.com/seanmiddleditch/Catch into seanmiddleditch-explicit-bool-conversion
2016-02-29 08:05:46 +00:00
Phil Nash
91bfe68a75
Suppress parentheses warnings on clang and gcc
...
- should address #593 , #528 , #521 , #496 (and possibly others)
2016-02-29 08:03:48 +00:00
Phil Nash
8ccb18daa9
Added --use-colour option to give finer control over colourisation.
...
--force-colour is still present but deprecated (will remove in v2)
2016-02-29 08:03:48 +00:00
Sean Middleditch
776247af81
Support explicit operator bool
...
Fix for issue 596
2016-02-25 00:34:09 -08:00
Phil Nash
3b4edd7a48
Build for v1.3.4
2016-02-10 19:24:48 +00:00
Phil Nash
ffad3a0a39
Fix as suggested in #574
...
Cast expression to bool to prevent custom && from defeating short-circuiting
2016-02-10 05:49:56 +00:00
Phil Nash
c7243562b0
v1.3.3
2016-01-22 07:59:06 +00:00
Phil Nash
b84e08ad6f
Fix EndsWith Matcher (and refactored EndsWith and StartsWith in terms of endsWith and startsWith) (see Issue #573 )
2016-01-22 07:59:06 +00:00
Phil Nash
7424b23bfb
v1.3.1
2015-12-28 15:07:32 +00:00
Simon Warta
a5fba672e1
Add missing comma when in captured expression for matchers
...
Such that
CHECK_THAT( hex_encode(outbuf) Equals("B5D4045C") )
becomes
CHECK_THAT( hex_encode(outbuf), Equals("B5D4045C") )
2015-12-10 08:09:10 +00:00
Phil Nash
981347b6e4
patch build to include last two fixes
2015-12-09 18:11:48 +00:00
Phil Nash
9e341231ba
main takes args by non-const char*
...
- see #548
2015-12-09 06:22:15 +00:00
Phil Nash
2b688e1cef
Initialise m_currentSortOrder
...
- as reported in #545
2015-12-09 06:15:52 +00:00
Phil Nash
722315a1f5
Removed some trailing whitespace
2015-12-04 10:20:33 +00:00
Phil Nash
fdc42d0af4
Merged from develop branch
...
- now v1.3.0
2015-12-04 10:19:08 +00:00
Phil Nash
7e15d9b20b
dev build 4
2015-11-20 16:59:14 +00:00
Phil Nash
0e64973f55
Added support for manually registering test functions.
...
As discussed in #421
2015-11-20 16:58:16 +00:00
Phil Nash
e4fa62a14e
dev build 3
2015-11-18 08:39:54 +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
CNugteren
3523c39f44
Changed 'auto' into 'bool' for C++98 compatibility
2015-11-12 15:31:42 +01:00
cnugteren
2585d280d1
Added an optional absolute margin to the approximation checks
2015-11-12 15:11:36 +01:00
Phil Nash
92356769f1
dev build 2
2015-11-06 18:07:29 +00:00
Phil Nash
d10b73f9f1
changed Not struct to a class.
...
- it was forward declared as a class, which caused warnings on some compilers. It should really have been a class anyway.
- this addresses the same issue as PR #534 , albeit from the other angle.
2015-11-06 18:07:29 +00:00
Phil Nash
08844e7e57
build 1.3.0-develop.1
...
I've incremented the minor release number. This is a slight abuse of semantic versioning so let me explain:
I've slightly changed how matchers are used. The matcher macro (REQUIRE_THAT/ CHECK_THAT) used to introduce the Catch::Matchers namespace before the macro token for the matcher, to save you having import the namespace yourself.
The trouble is if the matcher token is not a simple matcher (can now be an expression) this breaks!
So I've removed that qualification. Now if you use Matchers you'll have to do somethings like using namespace Catch::Matchers to bring them in.
This is a breaking change - but, OTTOH, Matchers are an undocumented "beta' feature that I've stated in the past is not guaranteed to have a stable API - so I don't think this warrants a major version change - but I did want to make it significant enough that people do notice that something is going on - and perhaps lead them to this commit message.
2015-11-05 18:52:18 +00:00
Phil Nash
054e3c5b43
Added &&, || and ! operator overloads for matchers
...
(syntactic sugar for AllOf, AnyOf and Not compositional matchers, respectively)
2015-11-05 18:46:00 +00:00
Phil Nash
f3e7722cc6
Don't introduce Catch::Matchers namespace in macro
...
- this could be a breaking change - fixed up self-test code to compensate
2015-11-05 18:10:33 +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
ece529ae7c
Fixed noexcept destructors issue
2015-11-03 17:37:43 +00:00
Phil Nash
9e42153fe5
dev build 16
2015-11-03 17:06:54 +00:00
Phil Nash
f5642be7b4
Fixed reversed logic of NoAssertions warning check
...
(that explains the previous regressions)
2015-11-03 17:05:08 +00:00
Phil Nash
7e34619f03
v1.2.1-develop.15
...
- includes all new section tracker
2015-11-03 08:01:27 +00:00
Phil Nash
bc8840cbb8
Removed deprecated section tracking implementation and tests
2015-11-03 07:38:14 +00:00
Phil Nash
aa49823bc0
perform startRun() at the start of each test case
2015-11-03 07:29:23 +00:00
Phil Nash
52a417df7b
Fitted new section tracking
2015-11-02 19:21:46 +00:00
Phil Nash
b8515929b8
Moved all new tracking impl into catch_test_case_tracker.pp
2015-11-02 06:14:52 +00:00
Jędrzej
bc00d59a4e
Fix typo in catch_stream.hpp
2015-10-22 21:49:32 +02:00
Phil Nash
d43a47efca
Refactored stream related stuff
...
- simpler, polymorphic hierarchy-based, approach
- less bitty conditionals spread across the code
- all resolved up-front so now config class is immutable
(it had evolved the way it was and in need of a clean-up sweep for a long time)
2015-09-29 19:23:06 +01:00
Phil Nash
a0de07d45b
Some small clean-ups and refactorings
...
- removed previous instance saves in RunContext (they were a hang-over from embedded contexts)
- started cleaning up config usage
2015-09-28 01:09:06 -07:00
Phil Nash
0c1c9fa922
dev build 14
...
- workaround for uncaught_exception issue
- avoid mutating vector while iterating it (due to re-entrancy)
2015-09-27 03:28:14 -07:00
Phil Nash
166ca2e819
Do uncaught_exception checking before calling sectionEnded
...
- split the uncaught handling (adding to unfinishedSections) into separate method
2015-09-26 18:12:21 -07:00
Phil Nash
15317632f3
Revert "Fix parentheses warning on expression evaluation when using ccache"
...
This reverts commit 7da777a4b7
.
2015-09-26 18:06:53 -07:00
segalaj
7da777a4b7
Fix parentheses warning on expression evaluation when using ccache
2015-09-14 14:28:34 +02:00
Phil Nash
d234ed1a67
dev build 13
2015-08-24 06:28:25 +01:00
Phil Nash
7fd7c5b8c8
Merge branch 'matcher-not' into develop
...
* matcher-not:
Add matcher: Not()
2015-08-24 06:22:03 +01:00
Simon Warta
312b94e532
Add matcher: Not()
2015-08-12 11:07:55 +02:00
Phil Nash
40d0d2f656
Added unique_ptr detection to compiler_capabilities
...
- as well as use by C++11 conformant compilers now enabled for VS2013 on too (see #479 )
- updated docs with this (and long long and override support)
2015-08-11 08:09:41 +01:00
Phil Nash
ad7edd0680
Replaced some stray overrides with CATCH_OVERRIDE
2015-08-10 07:32:21 +01:00
Phil Nash
8a05f46a37
Removed use of std::copy_if (as it's limited to c++11)
2015-08-07 17:53:29 +01:00
Phil Nash
e73583d556
dev build 12
2015-08-07 17:30:34 +01:00
Phil Nash
afcc38efc5
Fixes for single include
2015-08-07 17:28:48 +01:00
Phil Nash
368714e7aa
Added Listeners (programatically provided extra reporters)
2015-08-07 08:20:56 +01:00
Phil Nash
4cb74761d9
Support for multiple reporters
...
- can't (yet) specify different targets for each reporter (e.g. different files)
2015-08-05 19:02:17 +01:00
Phil Nash
c06e1909ae
Refactored test filtering and sorting
2015-08-04 23:11:56 +01:00
Phil Nash
8b1b7cd66e
dev build 11
2015-08-03 07:40:52 +01:00
Phil Nash
34fa25ed2f
Removed Runner class
...
- it served no purpose - split into functions instead
2015-07-28 18:55:11 +01:00
Phil Nash
f3308ed7c4
Let gcc use __cplusplus identifier to decide if nullptr supported
...
- or, for 4.6, continue to check __GX_EXPERIMENTAL_CXX0X__
See GitHb issue #445 and PR #471
2015-07-27 18:42:36 +01:00
Phil Nash
74eef52644
dev build 10
2015-07-24 08:13:52 +01:00
Phil Nash
2f6371f2ec
dev build 9
2015-07-23 23:06:26 +01:00
Phil Nash
733ebb6024
Added CATCH_CONFIG_CPP11_LONG_LONG support
2015-07-23 23:05:05 +01:00
Phil Nash
d6e59cd56f
Fixed Xml encoding
...
- don't encode apostrophes
- only encode quotes in attributes
- encode control characters (as in PR #465 )
2015-07-23 18:45:31 +01:00
Phil Nash
5bbdc8fd38
Dev build 8
2015-07-15 23:03:11 +01:00
Phil Nash
72868920bb
Exception message assertions now work with matchers
2015-07-15 23:02:25 +01:00
Phil Nash
8342ae8dfb
dev build 7
2015-07-13 15:03:26 +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
93a842e2f0
dev build 6
2015-07-13 06:36:07 +01:00
Phil Nash
85de743d70
Added _THROWS_WITH macros
...
- asserts on exception message
2015-07-13 06:34:41 +01:00
Phil Nash
1dd0d4c61a
Force cout/ cerr to be initialised before errors in test registry are printed
...
- see #461
2015-07-10 07:46:19 +01:00
Phil Nash
57df3ba998
Force cout/ cerr to be initialised before errors in test registry are printed
...
- see #461
2015-07-10 07:44:37 +01:00
Phil Nash
e6b365dc8c
dev build 5
2015-07-07 08:25:15 +01:00
Phil Nash
02e1966db3
Changed --filenames-as-tags prefix to #, added -# as short form and updated docs
2015-07-06 18:46:50 +01:00
Phil Nash
584032dfa4
dev build 4
...
- undisturbed background colour (windows), from PR #456
2015-07-06 06:23:13 +01:00
Phil Nash
18acff62d3
Merge branch 'develop' of git://github.com/RandomInEqualities/Catch into RandomInEqualities-develop
2015-07-06 06:13:56 +01:00
Phil Nash
c1ca0fdabe
dev build 3
2015-07-03 18:30:25 +01:00
Phil Nash
d6f1446e4e
Fixed an issue on some compilers with implicit conversion from nullptr to Ptr
...
- also cleaned up some warnings to do with CATCH_NULL
2015-07-03 18:27:36 +01:00
csa
6160a2b079
Fix for white background in windows powershell when using colour output.
...
This commit fixes the white background that appears in windows powershell
when catch outputs messages with colour. The previous implementation
ignored the original background colour and defaulted to a white background.
2015-07-03 12:02:40 +02:00
Phil Nash
8f66e3495b
dev build 2
2015-07-02 23:03:13 +01:00
Phil Nash
d87e551efa
reseeds rng before each test case and provides access to seed through Catch::rngSeed() function
2015-07-02 23:02:35 +01:00
Phil Nash
b971fe785b
develop build 1
2015-07-02 08:21:38 +01:00
Phil Nash
088c5bc53e
--filenames-as-tags
2015-07-02 08:20:18 +01:00
Phil Nash
680b1a881b
Squashed some warnings about local variables shadowing members
...
- see #444
2015-07-01 07:50:53 +01:00
Phil Nash
805de43a3d
Use CATCH_NULL instead of NULL
...
- expands to nullptr if CATCH_CONFIG_CPP11_NULLPTR is defined (see #444 )
2015-07-01 07:33:27 +01:00
Phil Nash
3b18d9e962
build for v1.2.1
2015-06-30 18:26:09 +01:00
Phil Nash
6d5797231c
Split imply from TrackedSection class to avoid use of incomplete type
...
- see #450
2015-06-30 18:25:49 +01:00
Phil Nash
7ab3b5aefb
Added compiler feature suppression macros
...
_NO_ forms to disable detection of features - particularly C++11 features.
Also removed SFINAE detection (and use in tostring)
2015-06-30 08:41:55 +01:00
Phil Nash
21f7ef6fdc
Committed to semantic versioning
...
as prompted by #365 , #430 , #447 and a thread on the google group.
- split version bumping out of generateSingleHeader script
- separate scripts for bumping each version component
- "build" number only incremented for "develop" builds
2015-06-29 18:06:15 +01:00
Phil Nash
8cc1108f2b
Use <= operator instead of ->* for decomposer
...
Allows more complex LHS expressions - and works around an Eclipse bug.
See Issues #359 , #393 and #247 for details
2015-06-26 06:46:37 +01:00
Phil Nash
c51e86819d
build 3
2015-05-21 06:16:15 +01:00
Phil Nash
fc63b020c5
suppressed some more warnings
2015-05-21 06:15:53 +01:00
Phil Nash
6ed74b5cab
changed hex threshold on ints to 255
...
- and print it in *addition* to the decimal form
2015-05-20 18:28:22 +01:00
Phil Nash
43470b2606
Removed CATCH_CONFIG_CPP11_NULLPTR for VS2015
...
- as it was already there for VS2010 on
2015-05-19 22:38:30 +01:00
Phil Nash
318c936712
build 2
2015-05-19 22:31:57 +01:00
Phil Nash
e86daf8bdd
Reorganised C+11 feature detection a bit
...
and added CATCH_CONFIG_CPP11_NULLPTR for VS2015
2015-05-19 22:31:57 +01:00
Phil Nash
c708570d46
Merge branch 'develop' of git://github.com/BMBurstein/Catch into BMBurstein-develop
2015-05-18 08:38:50 +01:00
Baruch
465454fecc
Fix REQUIRE_FALSE so that it aborts test case
2015-04-29 13:54:47 +03:00
Phil Nash
37e556186c
v1.1 build 1 (master)
...
Updated version for master and regenerated single include
2015-03-27 18:02:28 +00:00
Phil Nash
0ae7578028
Restored tag parsing when checking for reserved tags
...
- had been accidentally deleted in an earlier refactoring.
A bit worrying that this didn't get spotted sooner!
2015-03-04 19:01:25 +00:00
Phil Nash
090c74c420
Use reinterpret_cast to eliminate some warnings
...
#369
2015-03-04 19:00:29 +00:00
Phil Nash
572911d880
Changed comment to work around header stitching bug
2015-03-04 18:33:31 +00:00
Phil Nash
a806c3e700
Build 14
2015-03-04 08:23:40 +00:00
Phil Nash
6d1da8e8d7
Merge branch 'develop' of git://github.com/peterhuene/Catch into peterhuene-develop
2015-03-04 08:06:04 +00:00
Phil Nash
ce0b170dc2
Suppress warnings correctly for Intel compiler
...
#376
2015-03-04 07:54:35 +00:00
Phil Nash
5eb7748a55
Changed relative #includes and made SourceLineInfo sortable (added < op)
2015-03-04 07:17:12 +00:00
Peter Huene
e5280b2c57
Add --force-colour option to force colour output.
...
Adding a --force-colour option to force colour output on POSIX systems,
provided a debugger is not attached.
This allows for Catch to output colours even if STDOUT is not a tty,
which can be the case when the test executable is being spawned by a
parent process (e.g. CMake's ctest).
2015-02-11 13:12:42 -08:00
Phil Nash
7f5615272b
build 13
...
toString for std:tuple
2014-12-30 18:47:29 +00:00
Phil Nash
75a08bbc6c
Merge branch 'tuple_to_string' of https://github.com/PureAbstract/Catch into PureAbstract-tuple_to_string
2014-12-30 18:42:17 +00:00
Phil Nash
d76e08113b
build 12
...
- includes updated xml reporter
2014-12-30 18:26:07 +00:00
Phil Nash
6817bb099d
Fixed up xml reporter and rebased
2014-12-30 18:24:31 +00:00
Phil Nash
1cbc4f2c9c
Merge branch 'develop' of https://github.com/SeanCline/Catch into develop
2014-12-23 18:54:08 +00:00
Phil Nash
92f0836fd3
build 11
2014-12-22 20:18:05 +00:00
Phil Nash
7619920f86
Support for reporting skipped tests
...
- implemented by TeamCity reporter
2014-12-22 20:10:33 +00:00
Phil Nash
576aff6085
build 10
...
First cut of TeamCity reporter
2014-12-21 00:21:23 +00:00
Phil Nash
458b3ae257
Fixed replace(inPlace) function
...
and added tests (should have done that in the first place - I'll never learn!)
2014-12-19 18:16:19 +00:00
Phil Nash
db0421e840
First commit of (in progress) TeamCity reporter
...
Should run but is not complete
2014-12-19 17:52:33 +00:00
Phil Nash
91c17f34eb
build 9
2014-12-15 07:26:31 +00:00
Phil Nash
0dd214f6db
tags with . prefix are all hidden
2014-12-15 07:25:34 +00:00
Phil Nash
6725e09003
any tag prefixed with . hides the test
2014-12-15 07:07:59 +00:00
Phil Nash
13f98431ad
build 8
2014-12-12 08:11:18 +00:00
Phil Nash
ff9e51df7f
toString( int ) uses hex for large values
...
now matches behaviour of unsigned int
2014-12-12 08:10:45 +00:00
Phil Nash
bd9fbe25f6
Fixed toString for Approx
...
restored to a specialisation instead of an overload
2014-12-11 23:48:11 +00:00
Phil Nash
b0545d1f12
Some toString cleanups
2014-12-09 18:49:58 +00:00
Phil Nash
e54ac70671
build 7
2014-10-21 07:25:26 +01:00
Phil Nash
bde3567f3e
Cleaned up terminal colouring impl and added more config options
2014-10-21 07:24:30 +01:00
Sean D. Cline
b0e53a8ee0
Move the xml reporter away from the deprecated IReporter interface.
2014-10-11 19:41:52 -04:00
Phil Nash
12fe67cc82
Updated NonCopyable (to include C++11 version) and use for Session and Section
2014-10-03 08:15:27 +01:00
Phil Nash
e606cebac5
Fixed #include
2014-10-02 19:13:21 +01:00
Phil Nash
383d7c06a1
Only use std::cout/ cert via Catch::cout/ cert - and make those conditional on CATCH_CONFIG_NOSTDOUT
2014-10-02 19:08:19 +01:00
Phil Nash
85b4e94192
build 6
2014-10-02 18:51:05 +01:00
Phil Nash
b1936d3b0e
Calls method of FatalConditionHandler (to avoid warnings)
2014-10-02 18:28:45 +01:00
Phil Nash
ee3b265aa1
build 5
2014-09-18 18:25:10 +01:00
Phil Nash
b62a1b5334
Moved RandomNumberGenerator out of function and pass in a named instance instead of a temporary - both for C++03 compatibility reasons
2014-09-18 18:24:41 +01:00
Phil Nash
16a7db036f
enable nullptr for VS2010
2014-09-18 18:23:47 +01:00
Phil Nash
73a0744452
Backed out PR #307 (use nullptr from VS2005) as it seems clr specific
2014-09-17 18:06:47 +01:00
Phil Nash
6492560394
Made sorting functors const
2014-09-15 23:36:39 +01:00
Phil Nash
9630454b0f
Added missing #include
2014-09-15 23:32:13 +01:00
Phil Nash
6a8e8ada0d
build 4
2014-09-15 18:40:24 +01:00
Phil Nash
fa0122bf54
Allow testing ordering to be specified as declaration, lexicographical, or random. Allow random seed to be specified
2014-09-15 18:39:31 +01:00
Phil Nash
ea33961b43
Factored out mention of "unprintable string" ("{?}")
2014-09-08 08:14:59 +01:00
Andy Sawyer
022a0b4fcb
catch_tostring: toString for std::tuple
2014-09-04 00:31:11 +01:00
Andy Sawyer
3196937343
catch_tostring: Add includes for tuple, type_traits
2014-09-04 00:17:36 +01:00
Andy Sawyer
95956444b7
catch_tostring: Move toString overload declarations
...
- Put all the declarations of the overloads early in the file, so they
get seen by the templates later on
2014-09-04 00:12:25 +01:00
Phil Nash
4caabfa45e
build 3
2014-09-03 19:23:22 +01:00
Phil Nash
fcf5ef0db6
Changed time function name to reflect that it actually returns Microseconds as reported in #323
2014-09-03 19:20:23 +01:00
Phil Nash
dd22431fea
Merge branch 'develop' of github.com:philsquared/Catch into develop
...
# By Andy Sawyer
# Via Andy Sawyer (1) and Phil Nash (1)
* 'develop' of github.com:philsquared/Catch:
catch_tostring: tostring for enum class types
SelfTest: Build as C++11, add EnumToString tests
SelfTest: refresh makefile
2014-09-03 08:40:07 +01:00
Phil Nash
3eefa7f537
use nullptr in MSVC from 2005+
...
(based on PR #307 - thanks alex85k)
2014-09-02 08:30:57 +01:00
Andy Sawyer
cd2a5aa688
catch_tostring: tostring for enum class types
2014-09-01 17:38:17 +01:00
Phil Nash
93b61e1194
v1.1 build 2 (develop branch)
...
- Signal hander support
2014-08-22 19:35:41 +01:00
Phil Nash
05743eeaa1
FatalErrorConditions now full close reporter states
...
- so the console reporter(s) show final summary and the xml reporters close their tags
2014-08-22 19:33:28 +01:00
Phil Nash
c1a8e1c5dd
Added signal handlers (and placeholder for SEH handlers)
...
- 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.
2014-08-22 08:07:39 +01:00
Phil Nash
b7e432eadc
Updated version for develop branch
2014-08-20 19:07:46 +01:00
Phil Nash
544bf33e73
build 53
...
includes wchar_t toString overloads and SCENARIO_METHOD macros
2014-08-20 08:09:32 +01:00
Ben Arnold
7b0a84a048
toString handles wchar_t raw strings
2014-08-14 12:28:23 +01:00
Phil Nash
0aae635035
Re-enable warnings disabled for GCC
2014-07-28 07:27:05 +01:00
Fabien Caylus
ae76945eaf
Hide warnings with GCC
2014-07-27 15:16:10 +02:00
Phil Nash
28c2e07879
build 52
2014-07-09 19:22:49 +01:00
Phil Nash
cab9141eec
Green summary bar is darker if not all passed
...
- and the green part now comes at the end (to emphasise the failures)
2014-07-09 18:24:24 +01:00
Phil Nash
d89e74faff
Format floats like doubles when printing - but add ‘f’ suffix (a lá #291 )
2014-07-09 18:16:40 +01:00
Phil Nash
ce56209250
build 51
2014-07-09 07:40:37 +01:00
Phil Nash
23181eeef0
Section no longer relies on copy-elision for correctness
...
- should address #293
- *may* address #271
2014-07-09 07:39:57 +01:00
Phil Nash
a469d9bc0f
Made Colour copyable to remove warning
2014-07-09 07:36:12 +01:00
Phil Nash
a31f05fe83
Removed C-style casts
2014-07-09 07:35:34 +01:00
Phil Nash
52e1e7414a
build 50
2014-07-03 08:11:38 +01:00
Phil Nash
9c1f9a8f9a
Added [!mayfail] tag to indicate test case that can fail without failing the suite.
...
Overhauled the summary report (including the expected failure count)
2014-07-03 08:09:57 +01:00
Phil Nash
acdd3b5745
Build 49
...
- _THROWS fix
- tag aliases
2014-06-30 07:35:36 +01:00
Phil Nash
1d210ebd37
Tag aliases feature
2014-06-30 07:33:17 +01:00
Phil Nash
006aafd982
Some clean-ups for string handling in Objective-C
2014-06-20 18:05:31 +01:00
Phil Nash
11cf45bc41
Fixed regression with -e
2014-06-05 18:11:31 +01:00
Phil Nash
ab03668c55
build 48
...
- big assertion capture refactoring
2014-06-02 07:48:03 +01:00
Phil Nash
be9fe76101
Renamed ShouldNegate to FalseTest
2014-05-29 08:00:20 +01:00
Phil Nash
10801c2876
Folded ExpressionResultBuilder into ResultBuilder
...
(even more SRP violations!)
2014-05-29 07:50:19 +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
7cbf74061b
Tweaked rawMemoryToString() along lines of suggestion in #281
2014-05-23 18:41:02 +01:00
Phil Nash
48fac9cf01
build 47
2014-05-20 19:02:37 +01:00
Phil Nash
d12c00666a
Make TagInfo non-local
2014-05-20 19:02:10 +01:00
Phil Nash
9241e436f9
Build 46
...
- Fixes some test spec parser issues and some warnings (compiler and analysers)
2014-05-20 18:50:59 +01:00
Phil Nash
5daa22dcc3
Fixed dereferenced null issue
2014-05-20 18:49:28 +01:00
Phil Nash
59d556907d
Attempt to prevent analyser warnings about dereferencing null.
2014-05-20 18:41:34 +01:00
Phil Nash
2c9e9ac004
Fixed space separated lists of test specs
...
- they form an AND expression. They were forming an OR expression due to changes made to fix -f - so that had to be fixed differently
2014-05-20 18:28:19 +01:00
Phil Nash
b43d7703e5
Tests hidden with legacy ./ prefix tagged as hidden
2014-05-20 18:11:23 +01:00
Phil Nash
fbf3f6f879
Fix case sensitivity when matching tags
...
(now insensitive again)
Also group case-different tags together when listing
2014-05-20 18:03:54 +01:00
Phil Nash
3bdc97d8ad
Suppressed a load of warnings
2014-05-19 18:57:14 +01:00
Phil Nash
ebd4888fe1
build 45
...
- fixes
2014-05-19 18:22:59 +01:00
Phil Nash
e8aa0bb19b
Fixed issue with reading test names from file
2014-05-19 18:20:44 +01:00
Phil Nash
fcf0deb116
Fixed issue with wildcards at the start of a string
2014-05-19 18:07:53 +01:00
Phil Nash
b5d1cfe441
Suppress switch statement warning
2014-05-19 17:57:01 +01:00
Phil Nash
ee956bc94e
Fixed isHidden regression
2014-05-19 17:50:58 +01:00
Phil Nash
65cc14c44e
build 44
...
- new name/ tag parser (fixes #279 )
2014-05-16 18:54:48 +01:00
Phil Nash
9bf43e7875
Refactored last usages of old tag parser and removed all the, now redundant, tag parsing code
2014-05-16 18:52:55 +01:00
Phil Nash
b1e7d161b5
Moved catch_test_spec.h to catch_test_spec.hpp
2014-05-16 18:28:58 +01:00
Phil Nash
ae75b3774a
Switched over to new name/ tag parser
2014-05-16 18:24:07 +01:00
Phil Nash
56b8d3a5f9
Moved new test spec code into appropriate header
...
- about to remove old test spec code and rewire throughout the codebase!
2014-05-16 07:23:31 +01:00
Phil Nash
f8cff10ff6
First cut of new test spec parser code
2014-05-16 06:50:00 +01:00
Phil Nash
ad4489043b
Unanonymised unions to avoid breaking on compilers that don’t support them
...
- e.g. GCC 4.3 and 4.4
- fixes #281
2014-05-13 17:48:47 +01:00
Phil Nash
4e044ed4b1
build 43
...
- removed some pragmas
2014-05-04 09:23:30 +01:00
Phil Nash
5a2df71b41
build 42: “compact” reporter
...
- thanks to Martin Moene
2014-05-01 19:07:02 +01:00
Phil Nash
c02c7003dc
Merged Martin Moene’s “compact reporter”
2014-05-01 07:27:57 +01:00
Phil Nash
174049532e
Build 41
...
- fixes
2014-04-23 18:19:49 +01:00
Phil Nash
1a6f2a0a80
Changed the way noexcept support is handled to (hopefully) fix #275 and #273
2014-04-23 18:19:19 +01:00
Phil Nash
aef6cd5332
build 40
...
- Fixed endianness when converting numbers to hex strings
- Added option to show invisibles (/t, /n) in printed strings with -i
- moved toString() impls to impl file
- avoid allocations for static strings used in reporter
2014-04-23 07:10:10 +01:00
Phil Nash
328a469c03
Moved tostring impl into catch_tostring.hpp
2014-04-23 07:03:15 +01:00
Phil Nash
97150f27ac
Renamed catch_tostring.hpp catch_tostring.h
...
- in preparation for splitting implementation into catch_tostring.hpp
2014-04-23 06:51:58 +01:00
Phil Nash
7059b2cdac
Added ability to show “invisibles” in strings (just tabs and newline chars, for now).
2014-04-22 18:23:42 +01:00
Phil Nash
48153e8e10
Considers endianness when printing raw memory into a string
2014-04-22 08:19:11 +01:00
Phil Nash
a020865990
Sections are, once again, eagerly entered.
...
When the section tracking code was rewritten a while back to simplify and iron out some bugs the order of evaluation was changed so that each new section was skipped on the first run through.
This had unwelcome consequences for some people.
This commit restores the original semantics (while maintaining the simpler, less buggy, new code).
2014-04-21 19:02:38 +01:00
Phil Nash
d7e1790347
Merge branch 'master' of https://github.com/gnzlbg/Catch
...
# By gnzlbg
# Via gnzlbg
* 'master' of https://github.com/gnzlbg/Catch :
Conditionally removes usage of deprecated features
Conflicts (resolved):
include/internal/catch_common.h
include/internal/catch_section.hpp
2014-04-18 08:49:35 +01:00
Phil Nash
9d469b6cb5
build 37
2014-04-18 08:30:31 +01:00
Phil Nash
7303b2b60e
Changed branchName to char*, as per #266
2014-04-18 08:28:52 +01:00
Phil Nash
970127e488
Removed some unnecessary core macros
2014-04-16 18:01:31 +01:00
Phil Nash
20cad7cb1d
Tags beginning with a non alpha-numeric character are now disallowed.
...
Added !throws special tag which denotes a test case to be skipped when run with -e
(the idea being that the test case is expected to throw an exception which is not caught within a XXX_THROWS assertion).
2014-04-15 18:44:37 +01:00
Phil Nash
c5406a25bf
build 35
2014-04-12 19:21:08 +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
af8cd98f20
New version of Clara that fixes operator= issue with ref member ( #265 )
2014-03-24 18:15:04 +00:00
gnzlbg
ce6598599b
Conditionally removes usage of deprecated features
...
-add macros to test for C++ version and features
to catch_compiler_capabilities.hpp
- replaces dynamic exception specifications (deprecated)
with noexcept in C++ Version >= 11
- defines defaulted copy constructor/move constructors/assignment
in C++ Version >= 11 since their implicit generation is deprecated
under some circumstances.
- fixes #259
2014-03-20 14:03:51 +01:00
Phil Nash
472dc2a61f
New version of Clara
...
- interface changed slightly
- moved clara.h and tbc_text_format.h into “external” folder
2014-03-17 18:40:58 +00:00
Phil Nash
f9df35b12b
Fixed instance of Clara::_ placeholder when using CATCH_CONFIG_RUNNER
2014-03-10 18:02:18 +00:00
Phil Nash
dd2810d60a
build 30
...
- with Clara fix for null deref crash
2014-03-07 06:58:33 +00:00
Phil Nash
9abb27676d
Fix problem (hopefully) with single source definitions from Clara
...
- define CLARA_CONFIG_MAIN in the right place
2014-03-06 21:53:34 +00:00
Phil Nash
fd879f7e77
Build 28
...
- new version of Clara
- removed command line tests
2014-03-06 08:17:24 +00:00
Phil Nash
b9fea75109
New version of Clara.
...
- updated command line setup with new API
- updated STITCH macros
- force embedded Clara to use Catch’s console width (but restore it after)
- remove command line tests (as these have now moved into the Clara project)
2014-03-06 08:16:06 +00:00
Phil Nash
1f1ee3c63d
New version of Clara
...
- Clara now built with new stitch script (based on generateSingleInclude)
- also fixed python scripts for python 3 (print now a function rather than a keyword)
2014-03-01 10:38:14 +00:00
Phil Nash
1c2fbe146b
build 26
2014-02-11 18:12:41 +00:00
Phil Nash
b15726beba
Added #include for <memory> to Clara
...
- thanks again, Martin
2014-02-11 17:45:15 +00:00
Phil Nash
160b74d6c7
… and <stdexcept>
2014-02-11 17:41:11 +00:00
Phil Nash
633feaa4a6
Added #include <algorithm> to clara.h
...
- thanks Martin
2014-02-11 17:40:11 +00:00
Phil Nash
0dc49d1b57
Extracted stand-alone micro-library, tbc_text_format.h, from catch_text.h.
...
- use this version in clara.h so clara can stand alone.
2014-02-11 06:32:56 +00:00
Phil Nash
b756243935
Fixed some comments
2014-02-10 17:31:31 +00:00
Phil Nash
c98a97cf90
Tweaked Cliche macros/ names
2014-02-10 17:30:12 +00:00
Phil Nash
4554155e3d
Made Clara a “Cliche” header, which will be usable independently of Catch.
...
- This is just a first step. It still has a dependency on catch_text.h, which also needs to be made a Cliche header.
- These then need their own homes on GitHub.
2014-02-10 17:20:30 +00:00
Phil Nash
7eb5acc183
build 25
...
- fix for #231
2014-01-08 17:17:31 +00:00
Phil Nash
46a1fc7615
Removed unnecessary union name
2014-01-07 17:43:18 +00:00
Phil Nash
be890d0c15
build 24
2014-01-07 17:26:59 +00:00
Phil Nash
e091018514
Fixes toString() for function pointers and added support for member function pointers.
...
- thanks to Malcolm Noyes for supplying sample code on which the solution here was based
2014-01-07 17:25:27 +00:00
Phil Nash
440a47011f
Convert pointers to integrates when printing.
...
- handles function pointers that way too (otherwise printed as 1 by gcc and clang)
2014-01-04 19:12:05 +00:00
Phil Nash
e45e3a139a
Clara ignores anything after a lone — (double dash)
...
- this allows use within an environment that appends additional arguments that Clara will otherwise reject
- generated build 23
2013-12-23 10:24:06 +00:00