Commit Graph

1790 Commits

Author SHA1 Message Date
Patrick Junger d4e0b1d093 Added namespace in method testCaseEnded
Did not compile as is
2017-05-14 14:11:47 +02:00
Antonio Di Monaco b8443e67da Added Win32 UNICODE wmain support (#903)
* Added wmain support
* Added appveyor.yml wmain configuration
* Added wmain configuration flag to CMake
2017-05-11 13:00:03 +02:00
Martin Hořeňovský 5604ec7266 Updated toString documentation
It will need another update when Catch 2 goes live.

Closes #741
2017-05-03 21:09:27 +02:00
Benjamin R. Jack 6f012f2d1d Added warning if source file cannot be found
If source files are defined using relative paths, CMake will compile the tests, but this script will (sometimes) fail to find and parse the tests from the source files.  I have added an explicit warning when ParseAndAddCatchTests fails to find a source file.
2017-05-01 19:55:17 +02:00
Martin Hořeňovský 98e61c31df Approval tests now see different line endings as ok
This is mostly to deal with WSL, where git will checkout file with CRLF,
but code that uses formatted output will be writing LFs.
2017-04-29 18:06:36 +02:00
Martin Hořeňovský e641485132 Updated approval tests 2017-04-29 17:54:10 +02:00
Martin Hořeňovský a3ceb8f007 Approval tests now can deal with different expansions of errno 2017-04-29 17:52:12 +02:00
Martin Hořeňovský b819432271 Don't clear out all messages upon printing an assertion.
Previously, this would not print out any messages for the last CHECK
```cpp
TEST_CASE("Foo") {
INFO("Test case start");
for (int i = 0; i < 2; ++i) {
INFO("The number is " << i);
CHECK(i == 0);
}
CHECK(false);
}
```

now it does.
2017-04-29 17:50:03 +02:00
Martin Hořeňovský 9ceae8f51f CMake binaries are now conditionally enabled
Defining NO_SELFTEST=1 when cmake configuration is being done now turns
off SelfTest and Benchmark executables. This is for projects that
consume Catch using ExternalProject_Add and don't want to build our
selftest binaries for their unit test suite.

Closes #897
2017-04-28 20:27:10 +02:00
Martin Hořeňovský 5ffc8a84cd Fix order of arguments in CATCH_FAIL and nonvariadic INTERNAL_CATCH_MSG
Fixes #896
2017-04-28 18:30:04 +02:00
JayAndCatchFire 6e0fa4be68 Update opensource-users.md
Fixed broken link to LICENSE
2017-04-27 10:29:58 +02:00
Phil Nash a0ada2e935 v1.9.3 2017-04-25 14:23:06 +00:00
Phil Nash e4694f58da Removed errant uses of uint64_t
fixes #894
2017-04-25 14:15:59 +00:00
Martin Hořeňovský fc7f0a02b8 v1.9.2 2017-04-25 11:08:02 +02:00
Phil Nash 211b330346 Don’t unconditionally #include <stdint.h> (as earlier MSVC don’t have it) 2017-04-25 08:43:14 +01:00
Phil Nash d36fe214a6 Further tweaked alignment hack for Option 2017-04-25 08:38:25 +01:00
Martin Hořeňovský a34c053f0a All of Approx's member functions now accept strong typedefs
Previously `Approx::operator()`, `Approx::epsilon`, `Approx::margin` and
`Approx::scale` didn't.

Closes #888
2017-04-24 22:01:45 +02:00
Martin Hořeňovský 4cdb203ec3 Improve documentation about using Catch with CMake
Also added a note about the `contrib/ParseAndAddCatchTests.cmake`
script.

Closes #882
2017-04-24 16:27:43 +02:00
Ernst Maurer 8014bf1124 cmake script to generate ctest definitions from catch tests: fix for test case body bracket 2017-04-24 13:33:04 +02:00
Alexander Batischev 49d87cf182 Add Newsbeuter to OSS users list (#891) 2017-04-22 16:02:55 +02:00
Phil Nash eedcc82d31 Tweaked storage alignment "workaround" a bit more in Option. 2017-04-21 07:19:39 +01:00
Martin Hořeňovský 8e8259091c Fix .travis.yml syntax 2017-04-20 22:54:17 +02:00
Martin Hořeňovský 7869e5b007 Enable C++11 and C++14 on OSX on Travis 2017-04-20 22:52:41 +02:00
Martin Hořeňovský a49af4648c Minor .travis.yml cleanup
Still could use someone more experienced to clean it up properly...
2017-04-20 22:50:07 +02:00
Martin Hořeňovský 417b2bcf5c Enable C++14 on Linux on Travis 2017-04-20 22:47:05 +02:00
Martin Hořeňovský 8f0feaa6d2 Enable /std:c++latest (C++17) for AppVeyor VS 2017 2017-04-20 21:32:50 +02:00
Martin Hořeňovský b95163bd3a Don't enable POSIX signals under QNX
Fixes #889
2017-04-20 21:02:25 +02:00
Phil Nash 2809be87cc “fixed” alignment in Option 2017-04-20 14:39:07 +01:00
Martin Hořeňovský ac369b7b83 Add script that helps with updating the Vcpkg package.
Kind of a hackjob, that assumes vcpkg is already checked out
and is next to the Catch's directory.
2017-04-11 17:25:04 +02:00
Ernst Maurer 1aa3e4abfa Add CMake script to generate ctest definitions from Catch tests (#879)
Added cmake script to parse the source files containing Catch's test and generate ctest definitions.

It generates one ctest test per `TEST_CASE` and labels them, using the `TEST_CASE`'s tags.

Closes #719.
2017-04-11 16:51:02 +02: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 2bf30e9e5a Use (locally defined) UInt64 instead of uint64_t
- typedefs long long for MSVC
- typedefs uint64_t otherwise

Should probably do finer grained compiler checking - but this should at least be better than what was there before
2017-04-11 15:06:25 +01:00
Phil Nash b591cb9a03 Added note about thread safety in assertions
- closes #875
2017-04-11 14:25:19 +01:00
Phil Nash 714d01c07c approved tests that were correct the first time (previous approvals were erroneous) 2017-04-09 20:40:11 +01:00
Martin Hořeňovský c6990cdf91 v1.9.1 release 2017-04-09 21:25:20 +02:00
Martin Hořeňovský da8786b8fd Unexpected exception are no longer ignored by default
What an embarassing bug, I'll have to look into why it wasn't caught by
any of Catch's self-tests.

Fixes #885 and closes #887 (duplicate)
2017-04-09 21:20:58 +02:00
Phil Nash 5577322062 Added Nonius to open-sources users 2017-04-08 22:47:13 +01:00
Martin Hořeňovský 1b03c5ab6a v1.9.0 release 2017-04-07 22:56:36 +02:00
Phil Nash 7dd3c19027 Added NASA to commercial users list 2017-04-07 19:12:13 +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
Phil Nash 250f0ee7fb Added approvals for “failed as expected” tests 2017-04-07 09:33:19 +01:00
Martin Hořeňovský 09e4830199 Added VS2017 to AppVeyor matrix 2017-04-06 11:01:49 +02:00
Martin Hořeňovský 8f85d08e9f Give up on _Pragma for gcc, force disable Wparentheses in all TUs 2017-04-05 21:37:27 +02:00
Martin Hořeňovský 3ae076ce8d Updated REQUIRE* documentation under FAST_COMPILE 2017-04-05 10:26:19 +02:00
Sergey Semushin 94425ad59b Add opt-in c++11 stream insertable check. (#877)
* Add opt-in c++11 stream insertable check.

To opt-in, define CATCH_CONFIG_CPP11_STREAM_INSERTABLE_CHECK.

Opt-in fixes #872 and should fix #757 as well.
2017-04-05 09:53:10 +02:00
Martin Hořeňovský 0354d50278 Added templated constructor to C++11 Approx
When using C++11, comparison operators are already templated to take
anything that can be explicitly converted to double, but constructor
took only doubles. This lead to warnings when an `Approx` was
constructed from floats, which was problematic for some users.

Since just adding float constructor would be a large breaking change, as
suddenly `Approx( 1 )` would become ambiguous, I added a templated
constructor that will take anything that is explicitly convertible to
double. This has the added benefit of allowing constructing `Approx`
instances from instances of strong typedefs, ie allowing
`calculated_temp == Approx( known_temp)`.

Closes #873
2017-04-04 15:19:15 +02:00
Martin Hořeňovský cdd83c2e15 Fmt and tag fixup for #876
Github wouldn't let me push to the PR, probably because it was made from
fork of a fork...
2017-04-04 11:31:13 +02:00
dvirtz 9a07dde16d print messages when unexpected exceptions are thrown 2017-04-04 11:27:19 +02:00
Martin Hořeňovský 6e091d3991 Reset the UnexpectedException report state 2017-04-03 11:48:50 +02:00