Phil Nash
1f5ec9884c
Rebased approvals following previous reversal (d’oh!)
2017-02-06 16:23:34 +00:00
Phil Nash
88b760276d
Revert "XmlWriter reverts to XML 1.0."
...
This reverts commit a189387f49
.
2017-02-06 16:21:01 +00:00
Phil Nash
23eb4cc580
Added stdout and stderr to XML Reporter
2017-02-06 16:14:06 +00:00
Phil Nash
a189387f49
XmlWriter reverts to XML 1.0.
...
Character encodings that are not valid in XML 1.0 are instead written using C-style escapes
2017-02-06 16:00:05 +00:00
Martin Hořeňovský
f11a45aa67
Added benchmark for the char literals change
2017-01-29 23:23:33 +01:00
Martin Hořeňovský
efab3ca8b2
Added benchmark result for the SourceLineInfo change
2017-01-29 22:10:37 +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ý
60a9ac7e65
Enabled previous commit under MSVC, introduced new feature toggle
2017-01-26 18:47:29 +01:00
Jonathan Coe
c06afe438e
Add support for comparison of Approx with strong typedefs
...
closes #652
2017-01-26 18:44:03 +01:00
Martin Hořeňovský
4ce11d63a6
Merge branch 'dev-performance'
2017-01-25 22:56:36 +01:00
Martin Hořeňovský
51107d7cbd
Added copyright headers to benchmark files.
2017-01-25 22:42:41 +01:00
Martin Hořeňovský
83f4b39680
Added benchmark for previous commit, added iterations to failure bench.
2017-01-25 22:39:43 +01:00
Phil Nash
6c23a6582b
Mark CHECKed-throw test as [failing]
2017-01-24 09:53:04 +00:00
Phil Nash
7bcb42496d
Changed exception tests to allow for now throw-from-CHECK behaviour
2017-01-23 17:56:41 +00:00
Phil Nash
225e90d8ba
Don’t include tests that rely on varying two-phase-lookup behaviour in approval tests
2017-01-23 17:47:58 +00:00
Phil Nash
876af874f3
Added surrogate cpp for catch_test_case_tracker
2017-01-23 15:18:23 +00:00
Phil Nash
e7bcbb35c0
First cut of -c/—section option for running specific sections
2017-01-23 12:36:03 +00:00
Phil Nash
4a04682e49
Text formatting rework
...
Rewrote main wrapping loop. Now uses iterators instead of indices and intermediate strings.
Differentiates between chars to wrap before, after or instead of.
Doesn’t preserve trailing newlines.
Wraps or more characters.
Dropped support for using tab character as an indent setting control char.
Hopefully avoids all the undefined behaviour and other bugs of the previous implementation.
2017-01-23 12:28:40 +00: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
Martin Hořeňovský
877fd523bc
Added benchmark with Mickey Rose's improvements.
2017-01-14 22:51:44 +01:00
Martin Hořeňovský
3b7511e564
First commit of benchmarks for Catch runtime perf.
...
So far its very much a WIP with some problems that are known already and
not very representative tests.
2017-01-14 21:55:37 +01:00
Phil Nash
9062ebe390
Removed make file (now generated from CMake)
2017-01-12 11:22:30 +00:00
Phil Nash
b50572bbfd
Renamed missing project explainer filename
2017-01-09 21:59:53 +00:00
Phil Nash
7bb3e859aa
Removed all manually maintained project files in favour of instructions on how to use CMake to generate them
2017-01-09 17:38:42 +00:00
Phil Nash
0cde0e90a6
Added approvals for “Greater-than inequalities with different epsilons” test
2017-01-09 14:40:09 +00:00
Phil Nash
0f0dcd31eb
Excluded two more C++11 tests from Approval tests
2017-01-09 14:37:28 +00:00
Phil Nash
62cbde369e
Exclude test name from approval tests
2017-01-09 14:37:28 +00:00
Phil Nash
1ae84897d4
Marked tests that use C++11 features with [c++11] tag and exclude them from approval tests
2017-01-09 14:37:28 +00:00
Phil Nash
976a655496
Approval tests can use Catch path fixed in env. var, and convert nullptr and __null to 0 for comparison
2017-01-09 14:37:28 +00:00
Jonathan B. Coe
37e1e24309
add support for inequalities
2017-01-08 22:28:53 +01:00
Phil Nash
64193078bc
Moved CMake into root folder (where it’s much happier - especially for CLion)
2017-01-06 16:00:00 +00:00
Phil Nash
79acc0504b
Sort test ordering during Approval testing
2016-11-29 11:32:16 +00:00
Phil Nash
30cebd6177
Added some missing source files (including all SurrogateCpps) to CMake project.
...
Fixed up relative include paths to make this work.
2016-11-09 22:55:32 +00:00
Phil Nash
31861bbd46
rebased following recent changes
2016-09-27 10:28:11 +01:00
Phil Nash
b1eeec7c69
-f supports quoted test names (test name surrounded with " characters).
...
This is the first part to resolving #717
2016-09-27 10:27:28 +01:00
Robert A Zeh
5095619955
Fixes for XML encoding.
...
This commit fixes the following scenario:
* You have a test that compares strings with embedded control
characters.
* The test fails.
* You are using JUnit tests within TeamCity.
Before this commit, the JUnit report watcher fails on parsing the XML
for two reasons: the control characters are missing a semicolon at the
end, and the XML document doesn't specify that it is XML 1.1.
XML 1.0 --- what we get if we don't specify an XML version --- doesn't support embedding control characters --- see
http://stackoverflow.com/questions/404107/why-are-control-characters-illegal-in-xml
for all of the gory details.
This is based on PR #588 by @mrpi
2016-08-24 09:38:24 -05:00
Phil Nash
1c47fe023a
Updated embedded Clara to 0.0.2.3
...
- has all new, more robust, token parsing.
- eliminates issue with unreachable code
- allows use of forward slashes to introduce short args on Windows
2016-04-23 13:21:29 +01:00
Phil Nash
447f53e9e3
Fixed !shouldfail
2016-03-14 19:13:34 +00:00
Phil Nash
f895e0d95f
Rebased approvals following colour changes
2016-02-29 08:13:27 +00:00
Phil Nash
8ccb18daa9
Added --use-colour option to give finer control over colourisation.
...
--force-colour is still present but deprecated (will remove in v2)
2016-02-29 08:03:48 +00:00
Phil Nash
5262e61e9d
Approvals for Matcher change (added comma)
2015-12-10 18:43:29 +00:00
Phil Nash
84d1c080d6
Keep Xcode 7.1 happy
2015-12-04 10:21:07 +00:00
Phil Nash
722315a1f5
Removed some trailing whitespace
2015-12-04 10:20:33 +00:00
Phil Nash
d274fc571c
Added noexcept to CustomStdException destructor
2015-11-20 17:09:48 +00:00
Phil Nash
0e64973f55
Added support for manually registering test functions.
...
As discussed in #421
2015-11-20 16:58:16 +00:00
Phil Nash
a49f088032
exception translators considered even for types deriving from std::exception, now
...
- also added docs for exception translators
- updated approvals
2015-11-18 08:39:21 +00:00
Phil Nash
71fd2c2fdf
Fixed test names mentioning the new Matcher combinator operators
2015-11-06 18:07:28 +00:00
Phil Nash
054e3c5b43
Added &&, || and ! operator overloads for matchers
...
(syntactic sugar for AllOf, AnyOf and Not compositional matchers, respectively)
2015-11-05 18:46:00 +00:00
Phil Nash
f3e7722cc6
Don't introduce Catch::Matchers namespace in macro
...
- this could be a breaking change - fixed up self-test code to compensate
2015-11-05 18:10:33 +00:00
Phil Nash
e91738103c
Stripped trailing whitespace from all source code lines
...
(replaces need for PRs #310 and #504 )
2015-11-04 18:04:15 +00:00
Phil Nash
c81778ecd0
Fixed CMake file
...
(changed SectionTrackerTests.cpp - now deleted - to the new PartTrackerTests.cpp)
2015-11-03 17:06:24 +00:00
Phil Nash
f5642be7b4
Fixed reversed logic of NoAssertions warning check
...
(that explains the previous regressions)
2015-11-03 17:05:08 +00:00
Phil Nash
015e07100e
Added SUCCEEDs to empty leaf sections to avoid failing due to no assertions
2015-11-03 07:46:37 +00:00
Phil Nash
bc8840cbb8
Removed deprecated section tracking implementation and tests
2015-11-03 07:38:14 +00:00
Phil Nash
471bd2556a
Approved changes due to "No assertions" warnings now firing correctly on inner sections
2015-11-03 07:33:43 +00:00
Phil Nash
0b523db6b9
Converted all new part tracking tests/ sections to non variadic form
2015-11-02 06:16:09 +00:00
Phil Nash
b8515929b8
Moved all new tracking impl into catch_test_case_tracker.pp
2015-11-02 06:14:52 +00:00
Phil Nash
3deb3e010f
Removed the "part" component of the tracker names
2015-10-29 19:41:50 +00:00
Phil Nash
73a140fb9e
More minor tweaks
2015-10-29 19:33:25 +00:00
Phil Nash
ef62b578e2
Added tests for failing a section within a generator
...
- small fixes to implementation to make it work
2015-10-29 19:25:27 +00:00
Phil Nash
f4389b4fdb
more minor clean-ups
2015-10-29 08:33:50 +00:00
Phil Nash
4b99be6a9a
Cleaned tests up a bit
2015-10-29 08:17:55 +00:00
Phil Nash
293e54dcbe
Added IndexTracker and got it working with a single generator
...
- made some simplifications to state machine
2015-10-29 08:02:40 +00:00
Phil Nash
9a6a0865f2
More name changes
2015-10-23 18:44:48 +01:00
Phil Nash
2c6411e70a
Tweaks
2015-10-23 18:34:16 +01:00
Phil Nash
1cb993970a
First cut of new section/ part tracking
2015-10-23 18:20:33 +01:00
Phil Nash
d43a47efca
Refactored stream related stuff
...
- simpler, polymorphic hierarchy-based, approach
- less bitty conditionals spread across the code
- all resolved up-front so now config class is immutable
(it had evolved the way it was and in need of a clean-up sweep for a long time)
2015-09-29 19:23:06 +01:00
Phil Nash
afcc38efc5
Fixes for single include
2015-08-07 17:28:48 +01:00
Phil Nash
368714e7aa
Added Listeners (programatically provided extra reporters)
2015-08-07 08:20:56 +01:00
Phil Nash
4cb74761d9
Support for multiple reporters
...
- can't (yet) specify different targets for each reporter (e.g. different files)
2015-08-05 19:02:17 +01:00
Phil Nash
85c8074784
Set group name to -n parameter (or exe name)
...
- As discussed in #469
2015-07-28 18:26:09 +01:00
Phil Nash
0edebf41b0
approvals rebase
...
- I *think* this fixes an earlier regression, but I'm not 100% sure where that came from!
2015-07-28 18:24:20 +01:00
Phil Nash
e085d4811a
Qualified path to xmlwriter to fix travis error
2015-07-24 08:13:07 +01:00
Phil Nash
70975517b3
rebased approvals for long long test
2015-07-23 23:05:52 +01:00
Phil Nash
733ebb6024
Added CATCH_CONFIG_CPP11_LONG_LONG support
2015-07-23 23:05:05 +01:00
Phil Nash
d6e59cd56f
Fixed Xml encoding
...
- don't encode apostrophes
- only encode quotes in attributes
- encode control characters (as in PR #465 )
2015-07-23 18:45:31 +01:00
Phil Nash
72868920bb
Exception message assertions now work with matchers
2015-07-15 23:02:25 +01:00
Phil Nash
2104ca2aa4
Exception message testing now supports wildcards
...
- extracted WildcardPattern from TestSpec::NamePattern
2015-07-13 15:03:04 +01:00
Phil Nash
85de743d70
Added _THROWS_WITH macros
...
- asserts on exception message
2015-07-13 06:34:41 +01:00
Phil Nash
d6f1446e4e
Fixed an issue on some compilers with implicit conversion from nullptr to Ptr
...
- also cleaned up some warnings to do with CATCH_NULL
2015-07-03 18:27:36 +01:00
Phil Nash
088c5bc53e
--filenames-as-tags
2015-07-02 08:20:18 +01:00
Phil Nash
805de43a3d
Use CATCH_NULL instead of NULL
...
- expands to nullptr if CATCH_CONFIG_CPP11_NULLPTR is defined (see #444 )
2015-07-01 07:33:27 +01:00
Phil Nash
8cc1108f2b
Use <= operator instead of ->* for decomposer
...
Allows more complex LHS expressions - and works around an Eclipse bug.
See Issues #359 , #393 and #247 for details
2015-06-26 06:46:37 +01:00
Phil Nash
6ed74b5cab
changed hex threshold on ints to 255
...
- and print it in *addition* to the decimal form
2015-05-20 18:28:22 +01:00
Phil Nash
bfa3f863d6
Removed some more warnings
2015-05-19 18:23:52 +01:00
Phil Nash
2fc9de9370
Updated approvals following merge of develop back to master
2015-05-18 18:11:58 +01:00
Phil Nash
d9fbc62093
Merged from develop
2015-03-27 17:54:45 +00:00
Phil Nash
856468c8c4
Rebased to include new --force-colour tests
2015-03-04 08:22:32 +00:00
Peter Huene
e5280b2c57
Add --force-colour option to force colour output.
...
Adding a --force-colour option to force colour output on POSIX systems,
provided a debugger is not attached.
This allows for Catch to output colours even if STDOUT is not a tty,
which can be the case when the test executable is being spawned by a
parent process (e.g. CMake's ctest).
2015-02-11 13:12:42 -08:00
Phil Nash
50183208a3
Added tests for toString<std::tuple<>> and rebased
2014-12-30 18:47:01 +00:00
Phil Nash
75a08bbc6c
Merge branch 'tuple_to_string' of https://github.com/PureAbstract/Catch into PureAbstract-tuple_to_string
2014-12-30 18:42:17 +00:00
Phil Nash
c6635a7b79
Added type attribute to xml reporter output
...
- reports the macro used
2014-12-30 18:25:27 +00:00
Phil Nash
6817bb099d
Fixed up xml reporter and rebased
2014-12-30 18:24:31 +00:00
Phil Nash
3c8c9b2933
rebased
2014-12-22 20:17:50 +00:00
Phil Nash
fa751e6a37
FIxed a couple of test names
2014-12-22 20:17:26 +00:00
Phil Nash
3dc3763b07
Rebased
2014-12-21 00:20:09 +00:00
Phil Nash
8ec959e936
TeamCity reporter work
...
expanded reporting - includes section headers
2014-12-20 00:46:02 +00:00
Phil Nash
458b3ae257
Fixed replace(inPlace) function
...
and added tests (should have done that in the first place - I'll never learn!)
2014-12-19 18:16:19 +00:00
Phil Nash
db0421e840
First commit of (in progress) TeamCity reporter
...
Should run but is not complete
2014-12-19 17:52:33 +00:00
Phil Nash
0dd214f6db
tags with . prefix are all hidden
2014-12-15 07:25:34 +00:00
Phil Nash
ff9e51df7f
toString( int ) uses hex for large values
...
now matches behaviour of unsigned int
2014-12-12 08:10:45 +00:00
Phil Nash
a99e75b928
Made approvals more platform agnostic
...
removes root from all paths - so only relative paths remain
2014-12-11 23:40:29 +00:00
Jamie Bullock
aaa1970a06
More generic and maintainable makefile. Fixes #348
...
- implicit recipes
- wildcard glob of C++ files in directory
2014-11-08 18:57:03 +00:00
Jamie Bullock
81fc6d7111
Remove missing catch_self_test.cpp, fixes #348
2014-11-07 11:37:27 +00:00
Phil Nash
a5dca3d370
removed some warnings
2014-10-03 08:17:40 +01:00
Phil Nash
383d7c06a1
Only use std::cout/ cert via Catch::cout/ cert - and make those conditional on CATCH_CONFIG_NOSTDOUT
2014-10-02 19:08:19 +01:00
Phil Nash
8ec9a5a547
Updated project for Xcode 6
2014-10-02 18:25:05 +01:00
Phil Nash
d4e5f18436
Merged group name commit from develop
2014-09-08 08:42:36 +01:00
Phil Nash
3e1d3c7271
Give (currently not used, so global only) group a name
2014-09-08 08:14:22 +01:00
Phil Nash
886ef1620a
Some minor tidy-up/ style alignment of recent toString merges
2014-09-04 07:27:09 +01:00
Andy Sawyer
f559a51926
ToStringTuple - gcc doesn't like tuple init_list ctor
2014-09-04 01:05:51 +01:00
Andy Sawyer
13cbdf7e7d
Add tests for toString(std::tuple<...>)
2014-09-04 00:34:29 +01:00
Phil Nash
5ea3266857
Added baselines for new test cases
2014-09-03 19:22:47 +01:00
Phil Nash
ee5e7ed2c9
Merge branch 'develop' of github.com:philsquared/Catch into develop
...
# By Andy Sawyer
# Via Andy Sawyer (1) and Phil Nash (1)
* 'develop' of github.com:philsquared/Catch:
Updated CMakeLists.txt for toString work
A bunch of Catch::toString tests
2014-09-03 19:19:05 +01:00
Phil Nash
dd22431fea
Merge branch 'develop' of github.com:philsquared/Catch into develop
...
# By Andy Sawyer
# Via Andy Sawyer (1) and Phil Nash (1)
* 'develop' of github.com:philsquared/Catch:
catch_tostring: tostring for enum class types
SelfTest: Build as C++11, add EnumToString tests
SelfTest: refresh makefile
2014-09-03 08:40:07 +01:00
Andy Sawyer
fdbbb2c9bd
Updated CMakeLists.txt for toString work
2014-09-01 18:27:29 +01:00
Andy Sawyer
abf9ffc982
A bunch of Catch::toString tests
2014-09-01 18:09:37 +01:00
Andy Sawyer
142f8f4b1e
SelfTest: Build as C++11, add EnumToString tests
...
Note: EnumToString tests currently fail - haven't made the changes to
catch_tostring yet.
2014-09-01 17:24:45 +01:00
Andy Sawyer
000e746415
SelfTest: refresh makefile
2014-09-01 17:21:14 +01:00
Phil Nash
cb8fe472b2
Approvals for develop branch
2014-08-22 08:13:47 +01:00
Phil Nash
8edf4bf5d3
Removed signal handler test, for now
...
(to avoid screwing up the approval tests)
2014-08-22 08:13:15 +01:00
Phil Nash
c1a8e1c5dd
Added signal handlers (and placeholder for SEH handlers)
...
- based on PR 232 (https://github.com/philsquared/Catch/pull/232 - thanks Lukasz Forynski)
- Writes to reporter, so gets all the usual context, but then exits directly (since the stack cannot be resumed) so no summary
- On Windows does nothing, as yet.
2014-08-22 08:07:39 +01:00
Phil Nash
8b5a4e9355
Added approvals for new tests
2014-08-20 08:08:13 +01:00
Phil Nash
4aaf67ff31
const_casts to get rid of warnings in new wchar_t tests
2014-08-19 08:16:44 +01:00
Phil Nash
7bc0b44597
Merge branch 'master' of https://github.com/jbrwilkinson/Catch
...
# By James Wilkinson
# Via James Wilkinson
* 'master' of https://github.com/jbrwilkinson/Catch :
Added SCENARIO_METHOD for BDD testing with fixtures.
2014-08-19 08:13:30 +01:00
Ben Arnold
c7cf0a9f8b
Catch's Travis builds are using gcc that doesn't like the auto keyword
2014-08-14 12:53:21 +01:00
Ben Arnold
7b0a84a048
toString handles wchar_t raw strings
2014-08-14 12:28:23 +01:00
James Wilkinson
63005a1d89
Added SCENARIO_METHOD for BDD testing with fixtures.
2014-07-10 10:22:20 +01:00
Phil Nash
3ff3acf46c
Approvals for last change
2014-07-09 19:21:44 +01:00
Phil Nash
d89e74faff
Format floats like doubles when printing - but add ‘f’ suffix (a lá #291 )
2014-07-09 18:16:40 +01:00
Phil Nash
23181eeef0
Section no longer relies on copy-elision for correctness
...
- should address #293
- *may* address #271
2014-07-09 07:39:57 +01:00
Phil Nash
08e5296720
Regenerated single include and baselines
2014-07-03 19:08:44 +01:00
Phil Nash
9c1f9a8f9a
Added [!mayfail] tag to indicate test case that can fail without failing the suite.
...
Overhauled the summary report (including the expected failure count)
2014-07-03 08:09:57 +01:00
Phil Nash
d657b1ba52
Removed use of variadic form of SUCCEED from tests
...
- as per #284
2014-06-30 07:53:11 +01:00
Phil Nash
061861d940
Approved tag alias tests
2014-06-30 07:34:27 +01:00
Phil Nash
1d210ebd37
Tag aliases feature
2014-06-30 07:33:17 +01:00
Phil Nash
10801c2876
Folded ExpressionResultBuilder into ResultBuilder
...
(even more SRP violations!)
2014-05-29 07:50:19 +01:00
Phil Nash
9438a03d5b
Big assertion capture refactoring.
...
- moved as much logic out of the macros as possible
- moved most logic into new ResultBuilder class, which wraps ExpressionResultBuilder (may take it over next), subsumes ResultAction and also takes place of ExpressionDecomposer.
This introduces many SRP violations - but all in the name of minimising macro logic!
2014-05-28 18:53:01 +01:00
Phil Nash
14796814b8
Approved new test case
2014-05-23 18:55:05 +01:00
Phil Nash
7cbf74061b
Tweaked rawMemoryToString() along lines of suggestion in #281
2014-05-23 18:41:02 +01:00
Phil Nash
a2d8f774d2
Approved new test output
2014-05-20 18:28:48 +01:00
Phil Nash
2c9e9ac004
Fixed space separated lists of test specs
...
- they form an AND expression. They were forming an OR expression due to changes made to fix -f - so that had to be fixed differently
2014-05-20 18:28:19 +01:00
Phil Nash
baf181f15d
Minor fixes to a couple of test names
2014-05-20 18:11:43 +01:00
Phil Nash
e21d0b29cc
Killed a couple more warnings (one for VS2010 and one for Clang)
2014-05-19 19:04:38 +01:00
Phil Nash
3bdc97d8ad
Suppressed a load of warnings
2014-05-19 18:57:14 +01:00
Phil Nash
7139035906
Updated approvals after adding extra tests
2014-05-19 18:21:01 +01:00
Phil Nash
fcf0deb116
Fixed issue with wildcards at the start of a string
2014-05-19 18:07:53 +01:00
Phil Nash
9bf43e7875
Refactored last usages of old tag parser and removed all the, now redundant, tag parsing code
2014-05-16 18:52:55 +01:00
Phil Nash
766491a7c4
Approved all the changes following name/ tag parser rework
2014-05-16 18:31:15 +01:00
Phil Nash
b1e7d161b5
Moved catch_test_spec.h to catch_test_spec.hpp
2014-05-16 18:28:58 +01:00