Commit Graph

271 Commits

Author SHA1 Message Date
Martin Hořeňovský 9796846ad0 Workaround libstdc++-4.8 regex issue in approval tests 2017-11-13 18:19:40 +01:00
Phil Nash 74d3dfd4cc All tests files have .tests.cpp suffix. Also moved tests out of TestMain.cpp and moved up a level 2017-11-13 16:03:27 +00:00
Phil Nash e34754e433 Split SelfTest test files into Usage and Introspective varieties
Usage: just exercises Catch. The tests are over arbitrary date/ types
Introspective: Tests parts of Catch itself.
2017-11-13 15:38:52 +00:00
Martin Hořeňovský 55b71bebf1 Add tests for case insensitive string matching 2017-11-13 15:46:33 +01:00
Martin Hořeňovský b0857e846f Provide a regex matcher against std::string
Related to #1040
2017-11-13 15:35:31 +01:00
Phil Nash 3537b7858f Removed vestigal ComparatorT template arg to MatcherBase 2017-11-13 10:08:48 +00:00
Martin Hořeňovský b74d4ca96d Add compilation test for #1027 2017-11-13 10:07:06 +01:00
Martin Hořeňovský 8dbaac61ff Final set of fixes for floating matchers approvals 2017-11-12 11:49:36 +01:00
Martin Hořeňovský 030321e3e0 Add NAN test for Approx 2017-11-10 18:48:45 +01:00
Martin Hořeňovský 0b1f1b1003 Add ULP and margin matcher
Closes #1074
2017-11-10 18:33:00 +01:00
Martin Hořeňovský 22ac9d2184 Approx cleanup: More tests, INFINITY handling, etc 2017-11-01 07:30:11 +01:00
Martin Hořeňovský 11f716f28d Make Approx::margin inclusive
Fixes #952, related to #980
2017-10-31 14:49:00 +01:00
Phil Nash 05b1ca2884 Fixed expansion of _FALSE binary expression
- see #1051
2017-10-13 19:45:19 +01:00
Phil Nash c2b7bd15c0 Changed rhs expression capture from universal ref to const ref.
- addresses #1027
2017-10-13 14:16:14 +01:00
Martin Hořeňovský 17cdf20968 Mark part of std::chrono stringification tests nonportable 2017-10-09 14:56:23 +02:00
Martin Hořeňovský 760a25e813 Fix baseline for file where std::pair stringification is not enabled 2017-10-09 13:12:50 +02:00
Martin Hořeňovský 79b405fd3f Add stringification for std::chrono::{duration,time_point}
Also hides std::chrono, std::pair and std::chrono::* behind
new configuration macros, CATCH_CONFIG_ENABLE_*_STRINGMAKER
to avoid dragging in <utility>, <tuple> and <chrono> in common
path, unless requested.
2017-10-09 13:03:29 +02:00
Martin Hořeňovský 9aa96712ae Sweep out some extra warnings
Swept:
`-Wpadded` in some places (where it caused extra size, instead of just
saying "hey, we padded struct at the end to align, just as standard says")
`-Wweak-vtables` everywhere (Clang)
`-Wexit-time-destructors` everywhere (Clang)
`-Wmissing-noreturn` everywhere (Clang)

The last three are enabled for Clang compilation going forward.

Also enabled `-Wunreachable-code` for Clang and GCC
2017-09-07 17:25:15 +02:00
Phil Nash 6105282c4f Removed function pointer comparison test from approvals as it has different serilaisation behaviour in MSVC 2017-09-07 15:04:30 +01:00
Martin Hořeňovský b000411434 Stop accepting non-const comparison operators
A) non-const comparison operators should not exist and should not be
encouraged

B) The logic breaks comparing function pointers certain way

C) It was inconsistent anyway, as it only applied to `==` and `!=`

Closes #925
2017-09-06 15:01:03 +02:00
Martin Hořeňovský aef2e4d9e7 Update baselines 2017-09-02 20:29:05 +02:00
Martin Hořeňovský ab5d176195 Fix/disable failing approval tests 2017-09-02 10:51:19 +02:00
Martin Hořeňovský 4e4a13dfb4 Update approvals after removing deprecated matcher helpers 2017-08-31 11:50:34 +02:00
Martin Hořeňovský 61d2c375dd Add evaluation specialization for T* and long
Fixes #1005
2017-08-30 12:11:41 +02:00
Martin Hořeňovský faead53151 Update approval test baselines after removing [hide] tag 2017-08-29 13:48:20 +02:00
Phil Nash b1d0085796 Tweaked how failedButOk assertions are recorded
- fixes issue where sections in !shouldfail or !mayfail test cases that have failing assertions where marked as failed instead of failedButOk
2017-08-25 11:33:40 +01:00
Phil Nash ee75b324e7 Rebased with missing [failing] tag 2017-08-17 19:21:00 +01:00
Phil Nash 632e023ff4 Added non-copyable test to [failing] set 2017-08-17 16:55:35 +01:00
Phil Nash b8f482b9aa Added test comparing non-copyable values 2017-08-17 16:48:46 +01:00
Martin Hořeňovský f06ed856d8 Cherry picked 4f21bb72ff (Add tests for #961) from master
- had to redo the baselines
2017-08-15 12:43:27 +01:00
Phil Nash 3772f69f0f Removed String and StringBuilder 2017-08-14 09:04:14 +01:00
Phil Nash fa3535e95e Added << ostream overload to StringRef 2017-08-14 08:50:44 +01:00
Phil Nash bb8c1fb17f Rebased with string conversion tests 2017-08-14 08:43:33 +01:00
Phil Nash df5c31bb19 Cleaned up the output a bit
- removed [!shouldfail] test from "green" path
- changed "spanner" to more descriptive text
2017-08-11 10:38:29 +01:00
Phil Nash 6282999291 Rebased approvals with info loop change 2017-08-10 17:00:22 +01:00
Phil Nash 97c06ca6fb Merge branch 'reevaluate' into dev-modernize 2017-08-10 16:18:05 +01:00
Martin Hořeňovský 3382312bd8 Remove obsoleted `SCOPED_MSG` and `SCOPED_CAPTURE`
Standard `MSG` and `CAPTURE` behave the same way these used to,
and are recommended instead.
2017-08-10 17:06:32 +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 27fd8f80bd Integrated INTERNAL_CATCH_THROWS_STR_MATCHES with new AssertionHandler 2017-08-09 00:44:30 +01:00
Phil Nash 4421672fb8 Removed benchmark tests from approval tests (for now) 2017-08-05 11:26:20 +01:00
Phil Nash f45d35c980 Added benchmark tests 2017-08-05 11:12:29 +01:00
Phil Nash 58d8bc6985 Removed Text tests (TextFlow has it's own test suite) 2017-07-20 23:09:50 +01:00
Phil Nash 93556a1fb3 Removed "unapproved" baselines that got checked in at some point 2017-07-20 23:06:21 +01:00
Phil Nash d3c7d424fe Removed "long text" test (not a limitation of TextFlow) 2017-07-20 23:04:34 +01:00
Martin Hořeňovský 74ab1cd94b Update Baselines 2017-07-20 00:29:19 +02: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
Phil Nash c89bdf842e Removed failing enum test from test run 2017-07-13 09:18:40 +01:00
Phil Nash c874a99c6c Enabled c++11 tests in approvals 2017-07-13 08:52:51 +01:00
Martin Hořeňovský bc73189c52 Rebase baselines to take into account the removed test 2017-07-12 16:27:09 +02:00