Commit Graph

3274 Commits

Author SHA1 Message Date
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ý
a0dbc62955 Fix OS X compilation error 2017-11-10 19:56:39 +01:00
Martin Hořeňovský
cecee3459a Add another MSVC NAN macro 2017-11-10 19:52:43 +01:00
Martin Hořeňovský
030321e3e0 Add NAN test for Approx 2017-11-10 18:48:45 +01:00
Martin Hořeňovský
5f961af70e Remove leftover commented out lines 2017-11-10 18:37:58 +01:00
Martin Hořeňovský
0b1f1b1003 Add ULP and margin matcher
Closes #1074
2017-11-10 18:33:00 +01:00
Phil Nash
24e6d5fa33 Fixed release notes mention of *_THROWS_MATCHES
As reported in #1088
2017-11-09 11:09:17 +01:00
Martin Hořeňovský
13370bddf2 Revert "Move <ctime> include out of line"
This reverts commit 36f02d76d6.
2017-11-08 08:31:48 +01:00
Martin Hořeňovský
36f02d76d6 Move <ctime> include out of line 2017-11-07 21:59:52 +01:00
Phil Nash
07ac9b92e4 Updated badges (again) for Catch2 2017-11-07 18:50:55 +00:00
Phil Nash
0d3fc59f6d Added missing <memory> include 2017-11-07 18:48:57 +00:00
Phil Nash
56e1075613 Introduced ReusableStringStream and removed all uses of std::ostringstream from the main path
ReusableStringStream holds a std::ostringstream internally, but only exposes the ostream interface.
It caches a pool of ostringstreams in a vector which is currently global, but will be made thread-local.

Altogether this should enable both runtime and compile-time benefits. although more work is needed to realise the compile time opportunities.
2017-11-07 18:01:10 +00:00
Phil Nash
868e125d49 Moved a lot of stream related stuff out of the public headers and replaced more ostream dependencies with iosfwd 2017-11-07 15:55:09 +00:00
Phil Nash
c9cdb9a48f Tweaked logo 2017-11-07 11:41:49 +00:00
Phil Nash
5fd1d7174c Added link to Catch2 blog post 2017-11-07 11:27:01 +00:00
Phil Nash
3a4c765030 Refreshed artwork for Catch2 2017-11-07 11:25:13 +00:00
Martin Hořeňovský
a20b286999 Improve travis.yml
- Added new compilers and OS X images
- Option to run SelfTest under Valgrind
- Merge "Debug" and "Release" configurations into one run
-- This saves apt setup and cmake download step per compiler, 60-90s
- Fix C++14 compilation under Clang 3.8 and up
2017-11-07 11:24:18 +01:00
Daniel Doubleday
e28763ad05 Fix platform detection for iOS 2017-11-06 10:08:22 +01:00
Martin Hořeňovský
b2dd48f0c0 Cleanup travis.yml: remove duplicate compilers, remove unused flag 2017-11-05 15:58:12 +01:00
Martin Hořeňovský
7a562d39b2 Cleanup CMakelists.txt 2017-11-05 14:15:03 +01:00
Martin Moene
fa9c4207f1 Replace include_directories() with target_include_directories()
to prevent inheritance of include directories that possibly lead to a clash.

A clash occurs when a folder is included, e.g. examples, that wants to use the single-include directory instead of the normal include directory as used by the SelfTest in the next higher level.
2017-11-04 22:08:56 +01:00
Martin Hořeňovský
4f9123dc20 Remove self-include in header 2017-11-03 22:34:49 +01:00
Phil Nash
19ab2117c5 Remove spurious test following merge 2017-11-03 18:09:55 +00:00
Phil Nash
4acf112c19 Removed zombie files
These files were removed from the Catch2 branch, and crept back in when Catch2 merged with master
2017-11-03 16:56:11 +00:00
Phil Nash
53f6d3fc8e Locked release notes reference to v2.0.1 release 2017-11-03 13:31:59 +00:00
Phil Nash
cf76a795cc Added note about Catch2 to readme 2017-11-03 13:18:26 +00:00
Phil Nash
811f4d13d7 Updated links in readme 2017-11-03 13:15:22 +00:00
Phil Nash
7423a481eb Updated some Catch references to Catch2 2017-11-03 13:05:09 +00:00
Phil Nash
46c7c9d3a0 Merge branch 'catch2' 2017-11-03 12:05:38 +00:00
Phil Nash
b119ebdde1 v2.0.1 release 2017-11-03 12:01:52 +00:00
Phil Nash
1c43fb64c1 Added docs for extending command line with Clara 2017-11-02 18:01:24 +00:00
Phil Nash
8b40c26434 Removed handling of start-up exceptions from custom main docs 2017-11-02 18:01:24 +00:00
Phil Nash
fe05062f9e Print any start-up exceptions in Session's constructor, so custom main's don't need to worry about them 2017-11-02 17:58:07 +00:00
Martin Hořeňovský
31cc62e6b7 Updated release notes with Approx changes 2017-11-01 22:25:17 +01:00
Martin Hořeňovský
a49e6fdc27 Update Approx documentation 2017-11-01 13:45:21 +01:00
Pfiffikus
2d91035404 Update assertions.md
scale more detailed explained; have to be adapted to PR #1068 if necessary
2017-11-01 13:32:08 +01:00
Martin Hořeňovský
accf9859b4 Add OSX specific INFINITE macro parsing in approval tests 2017-11-01 08:46:49 +01:00
Martin Hořeňovský
22ac9d2184 Approx cleanup: More tests, INFINITY handling, etc 2017-11-01 07:30:11 +01:00
Pfiffikus
00af677577 Approx rework: default scale == 0, epsilon applies to Approx::value
Also adds check to Approx::epsilon that the new epsilon has a valid
(ie one between 0 and 1)

Based on
http://realtimecollisiondetection.net/blog/?p=89
https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/
https://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html
https://en.wikipedia.org/wiki/Approximation_error#Formal_Definition

The given epsilon should refer to the target value, otherwise
the result would be unexpected, e.g. 101.02 == Approx(100).epsilon(0.01)
is true.
The default scale should be invisible, thus,
e.g. 101.01 == Approx(100).epsilon(0.01) gets false.
Finally even 101.000001 == Approx(100).epsilon(0.01) is false
2017-10-31 15:43:42 +01:00
Martin Hořeňovský
ae21020640 dev build 6 2017-10-31 15:17:21 +01:00
Martin Hořeňovský
11f716f28d Make Approx::margin inclusive
Fixes #952, related to #980
2017-10-31 14:49:00 +01:00
Pfiffikus
c3ddd4a7e2 Update test-cases-and-sections.md
some clarification and typo correction
2017-10-31 14:28:30 +01:00
Clare Macrae
c43ce85416 Fix very minor typo
it's -> its
2017-10-31 14:28:20 +01:00
Pfiffikus
4220f2eef2 Update build-systems.md
typo correction
2017-10-31 14:28:10 +01:00
Sebastian Grottel
c1a91caf00 adds flushes to the output stream of teamcity reporter, making the test output more responsive. 2017-10-31 14:27:47 +01:00
Sebastian Grottel
96c5de678d RandomNumberGenerator::result_type should be unsigned (#1050)
`result_type` must be unsigned:
http://en.cppreference.com/w/cpp/concept/UniformRandomBitGenerator

Using a signed type causes an infinite loop working with MS Visual Studio 2017, targetting: v140, WindowsTargetPlatformVersion 10.0.15063.0, Debug, x64
2017-10-31 14:26:36 +01:00
dvirtz
e68485e196 added PARSE_CATCH_TESTS_ADD_TO_CONFIGURE_DEPENDS option 2017-10-31 14:21:20 +01:00
Martin Hořeňovský
88e912b4d1 Fix documentation crosslink in configuration.md 2017-10-31 14:19:53 +01:00
Dmitry Kozhevnikov
44244713f1 Update handling of __JETBRAINS_IDE__ macro
1. Use it to conditionally define CATCH_INTERNAL_CONFIG_COUNTER, not
   CATCH_CONFIG_COUNTER, as __JETBRAINS_IDE__ is similar to
   compiler-provided macros, not to user-provided ones.

2. Since __COUNTER__ will work starting with CLion 2017.3, use it
   when possible (and hopefully remove this check altogether
   at some point).
2017-10-31 14:15:54 +01:00
solvingj
eea9e1efd7 Minor - added header-only flag in conan
See header-only guidelines: 
http://conanio.readthedocs.io/en/latest/howtos/header_only.html?highlight=header%20only
Its borderline cosmetic, but it does have a purpose.
2017-10-31 14:09:44 +01:00