Phil Nash
0afd52b98d
Fix Objective-C Matchers
...
Fixes #854
2017-03-13 15:40:21 +00:00
Phil Nash
38b05f1400
Don’t assume first CL arg (exe name) is present
...
Fixes #729
2017-03-13 11:00:58 +00:00
Phil Nash
db9866677e
Don’t ref past end of string
...
fixes #830
2017-03-13 10:22:02 +00:00
Phil Nash
4101ff314a
#include <ctype> for std::to lower
2017-03-10 19:25:00 +00:00
Phil Nash
e4a25ad5ff
Added CATCH_REGISTER_LISTENER without the INTERNAL_ prefix
2017-03-10 19:15:03 +00:00
Phil Nash
5d6c744d38
Qualified std::tolower in Clara.
...
Fixes #543
2017-03-10 18:38:52 +00:00
Phil Nash
5dd0639520
Added FAIL_CHECK
...
Works like FAIL, but does not abort test.
As proposed in #765
2017-03-08 15:42:11 +00:00
Martin Hořeňovský
ace70407a2
Add tests for #835
...
Also add ErrnoGuard before `isatty` call, because apparently it can set
errno to 25 (ENOTTY).
2017-03-06 22:07:33 +01:00
Martin Hořeňovský
613e1466f9
Save errno before using sprintf, ifstream.
...
std::ifstream in libstdc++ contains a bug, where it sets errno to zero.
To work around it, we manually save the errno before using std::ifstream
in debugger check, and reset it after we are done.
We also preventively save errno before using sprintf.
Fixes #835
2017-03-06 21:51:22 +01:00
Martin Hořeňovský
e95bf48445
Take std::string by const-ref where possible
...
Most places already do, this brings over some forgotten places.
Also close #842
2017-03-06 13:16:43 +01:00
Phil Nash
041498b221
Fixed unintentional tabs
2017-03-06 09:23:31 +00:00
philsquared
d5a5883a10
Fixed mssing virtual destructor warnings
...
In Visual Studio with warning 4265 enabled
Closes #844
2017-03-06 08:59:52 +00:00
Phil Nash
f9db24a824
Refactored console reporter include logic to match Xml Reporter’s
2017-03-03 14:19:41 +00:00
Phil Nash
9bee606dd6
Tweaked Xml Reporter to follow same success/ info behaviour as Console reporter
2017-03-03 14:12:47 +00:00
Martin Hořeňovský
be4f6ab8e1
Change reporting of CAPTURE'd variables
...
Info is not changed, intentionally.
Closes #639
2017-03-03 14:34:50 +01:00
Martin Hořeňovský
cd6de9cd34
Don't reconstruct expression on encountering fatal error
...
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
2017-03-02 18:18:28 +01:00
Martin Hořeňovský
40f6a5b8a4
Added duration reporting to compact reporter
...
Also made the duration formatting code available to all reporters.
Closes #780
2017-03-02 16:16:17 +01:00
Martin Hořeňovský
95b0eb2b6c
TAP reporter now behaves as if -s was always set
...
This should fulfill the TAP specification better.
2017-03-02 15:54:08 +01:00
Martin Hořeňovský
0b28d3daf2
Merge branch 'tap-count-success' of https://github.com/gahr/Catch
2017-03-02 15:23:46 +01:00
Phil Nash
c6535a080e
v1.8.1 release
2017-03-01 16:04:44 +00:00
Phil Nash
673ec550f5
Moved definition of _BSD_SOURCE earlier
2017-03-01 15:59:10 +00:00
Pietro Cerutti
da023b2f9a
TAP Reporter: count success tests even if not printed
...
This fixes a bug whereas running the TAP reporter without the -s switch
causes the reporter to print 1..0.
2017-03-01 09:24:58 +00:00
Phil Nash
0952b76e16
v1.8.0 release
2017-02-28 14:19:09 +00:00
Martin Hořeňovský
d5c623b3b6
Merge branch 'develop' of https://github.com/CNugteren/Catch
...
This adds an optional absolute margin to the Approx checks.
2017-02-27 13:12:13 +01:00
Martin Hořeňovský
061a183036
Console reporter now uses fixed decimal formatting
...
3 decimal places, output in seconds.
2017-02-27 11:34:15 +01:00
Martin Hořeňovský
72b72ca937
Fix C++11 dependency in TAP reporter
2017-02-22 17:04:36 +01:00
Martin Hořeňovský
a8a6b3159d
Disabled C4312 in the evaluate layer
...
We reinterpret cast int to T* (because someone might compare 0 to a
ptr), which causes 4312 to fire when x64 platform is set.
Fixes #148
2017-02-22 14:14:59 +01:00
Martin Hořeňovský
9e2616aeac
Add missing assert.h include to reporter bases.
...
It being missing caused an error when compiling under MSVC.
2017-02-22 13:31:51 +01:00
Martin Hořeňovský
c5ffd2e3f0
Fixed up Automake reporter
2017-02-22 13:29:17 +01:00
Martin Hořeňovský
b0260c615d
Fixed-up TAP reporter a bit.
2017-02-22 13:28:13 +01:00
Colton Wolkins (Ogre)
a63ce953a0
Add TAP reporter
...
This is a hackish attempt to add a TAP reporter (see
philsquared/Catch#309 ) by following the TAP 12 specification
<http://testanything.org/tap-specification.html >. I'm unsure how well I
did in following the spec or with following good C++ guidelines.
Comments are appreciated.
Signed-off-by: Colton Wolkins (Ogre) <frostyfrog2@gmail.com>
2017-02-22 11:35:20 +01:00
Justin Wilson
b753f05d74
Add reporter for Automake ( #826 )
...
This allows for integration with Automake's default log compiler.
See #826 for more details.
2017-02-22 11:17:25 +01:00
Martin Hořeňovský
9bab7c8229
Changed console reporter test duration reporting format
...
Was
"<section-name> completed in XXX s."
Now is
"XXX s: <section-name>"
Closes #322
(cherry picked from commit 0805539)
2017-02-22 08:35:53 +00:00
Phil Nash
d8c4512b25
Removed tabs
2017-02-22 08:26:52 +00:00
Phil Nash
d2a59ad37b
Fixed test spec parser issue
...
- multiple specs in a single string, with escapes in each were erroring out
2017-02-22 07:49:38 +00:00
Phil Nash
10dfca34ac
Added first vector matchers (Contains and Equals)
2017-02-21 16:05:04 +00:00
Phil Nash
45d4096756
Generalised Matchers so objects and comparators can be different types
2017-02-21 15:52:03 +00:00
Phil Nash
1ca8cefa9a
Added #define needed for gettimeofday() to be declared on some versions of Cygwin
2017-02-21 11:32:32 +00:00
philsquared
ca66dd243c
Added a couple more unimplemented assignment operators to silence VS2013 warnings
2017-02-21 09:10:44 +00:00
philsquared
44632c3d71
Merge branch 'warning-c4512' of https://github.com/gchudnov/Catch into gchudnov-warning-c4512
2017-02-21 08:56:14 +00:00
philsquared
b1835e1de9
Moved WIndows leak detector code out of main()
2017-02-17 23:43:31 +00:00
Martin Hořeňovský
8cd413572a
Merge branch 'dev-windows-leakdetection'
2017-02-17 14:25:08 +01:00
Martin Hořeňovský
30e4dbef1c
Report leaks to debugger in addition to stderr
...
This branch should also close #120 .
2017-02-17 14:22:57 +01:00
Phil Nash
90b3946e9c
Add file/line to TestCase, Section and Failure elements in Xml Reporter
2017-02-17 10:26:17 +00:00
Martin Hořeňovský
d8230a8d4d
Add opt-in leak detection under MSVC + Windows.
...
Closes #439
2017-02-16 11:09:09 +01:00
Martin Hořeňovský
c6178601c5
Cygwin compatibility fixes
2017-02-15 17:57:22 +01:00
Martin Hořeňovský
2e0ae01b05
Improve -Wparentheses supression for gcc
...
If the gcc version supports `_Pragma` properly, we use that to disable
it locally inside assertions.
Otherwise we disable it for the entire TU.
Fixes #674
2017-02-15 17:11:44 +01:00
Phil Nash
fe690a68ef
push/pop warnings when disabling parentheses warnings within assertion (gcc/ clang)
2017-02-15 10:03:28 +00:00
Martin Hořeňovský
3cfef738e7
Merge branch 'dev-performance-round3'
2017-02-15 10:35:01 +01:00
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