Commit Graph

213 Commits

Author SHA1 Message Date
Martin Hořeňovský 7f6773bb4d Merge branch 'master' into dev-modernize
Hopefully nothing went too wrong.
2017-06-05 17:19:42 +02:00
Martin Hořeňovský 377c9a746d Cosmetic fixes (whitespace and spelling) 2017-05-27 14:42:54 +02:00
Martin Hořeňovský 0bb8e1247e Merge branch 'master' of https://github.com/awglyde/Catch 2017-05-16 16:09:51 +02:00
Phil Nash 687437fcd1 converted IStreamingReporter to unique_ptr 2017-05-05 15:43:31 +01: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
Phil Nash 316cb28ea8 Added missing <memory> includes 2017-04-26 17:04:00 +01:00
Phil Nash 8ccbf63f28 Removed Ptr, Shared and SharedImpl 2017-04-25 21:56:14 +01:00
Phil Nash e6094a9503 migrated (Reporter) Nodes to std::shared_ptr 2017-04-25 21:56:14 +01:00
Phil Nash 0844d6e867 Migrated IStreamingReporter from Ptr to std::shared_ptr 2017-04-25 21:56:14 +01:00
Phil Nash 338ba6b9ba Migrated Config and IConfig to shared_ptr (from Ptr) 2017-04-25 21:56:14 +01:00
Phil Nash e749724a11 A load more C++11 tweaks - mostly moving initialisations from constructors to inline 2017-04-25 19:30:53 +01:00
Phil Nash 79650e44f4 Removed more C++98/03 compatibility 2017-04-25 12:40:52 +01: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
Phil Nash 1f3ba8a0b6 Converted (almost) all for-loops with iterators or indices to range-based 2017-04-25 11:07:02 +01:00
Phil Nash e5c5a636a9 junit reporter does not count exceptions as failures if ok-to-fail 2017-04-11 15:47:42 +01:00
Phil Nash 29d26d3179 Commented out unused argument 2017-04-07 11:36:54 +01:00
Phil Nash ca764ec8d9 TeamCity reporter “ignores” failures in tests marked “ok to fail”
- also don’t report hidden/ not-selected tests
2017-04-07 11:15:37 +01:00
dvirtz 9a07dde16d print messages when unexpected exceptions are thrown 2017-04-04 11:27:19 +02:00
Kevin Ushey e04dc5105b use inline 'libraryVersion()' function (closes #858) 2017-03-22 15:51:02 +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
Alex Glyde d8f45cd5f1 changing tabs to spaces 2017-03-06 10:55:00 -05:00
Alex Glyde 3afd077b55 teamcity reporter should time durations explicitly 2017-03-06 10:35:03 -05: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 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ý 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
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
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ý 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 90b3946e9c Add file/line to TestCase, Section and Failure elements in Xml Reporter 2017-02-17 10:26:17 +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ý 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 ab44fb6811 The file/ line in sections is now of the section. not the test case 2017-02-10 11:56:46 +00:00
Marek Klus ab199d9cf9 XmlReporter: Trim test case name; added description and tags attributes to the test case element in the xml report. 2017-02-07 23:12:58 +00: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 23eb4cc580 Added stdout and stderr to XML Reporter 2017-02-06 16:14:06 +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ý 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ý 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ý 4ce11d63a6 Merge branch 'dev-performance' 2017-01-25 22:56:36 +01:00
Martin Hořeňovský b71a06cf98 JUnit reporter outputs timestamps now
Also extended approval tests script to support the change
2017-01-16 20:21:43 +01:00
Mickey Rose a1e9b841ff lazily stringify expressions 2017-01-14 21:56:16 +01:00
Phil Nash 0c093bee38 Removed now redundant xml stream initialisation 2016-11-29 12:13:55 +00:00