Commit Graph

79 Commits

Author SHA1 Message Date
Sam Bristow a04bd6d436 Remove duplicate CLI option
The "use-colour" option was accidentally duplicated as part of commit
feaf355 (Implemented libidentify support).
2017-08-28 12:16:23 +02:00
Phil Nash 61c5675c11 Removed inadvertent use of auto merged from dev-modernise 2017-08-15 19:34:10 +01:00
Phil Nash 70e4af9d44 Implemented wait-for-keypress option 2017-08-15 14:12:11 +01:00
Phil Nash feaf355489 Implemented libidentify support
- see https://github.com/janwilmans/LibIdentify
2017-08-11 19:55:55 +01:00
Martin Hořeňovský 07c6bfc3b9 --extra-info -> --list-extra-info, behaves like other --list-* flags 2017-06-25 17:12:29 +02:00
Baruch Burstein 616f7235ef add --extra-info flag
this will add line info to test lists, and test descriptions to the long
form of the test list
2017-06-25 17:12:29 +02:00
Martin Hořeňovský bc68b9f454 More include simplifications 2017-02-13 14:12:22 +01:00
Martin Hořeňovský 50dee9ae57 Fixed typo in CLI error reporting 2017-02-12 13:50:15 +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
Phil Nash e7bcbb35c0 First cut of -c/—section option for running specific sections 2017-01-23 12:36:03 +00:00
Martin Hořeňovský 3b98a0166f Various small string usage performance improvements.
* Empty strings are now direct constructed as `std::string()`, not as empty string literals.
* `startsWith` and `endsWith` no longer construct new a string. This should be an improvement
for libstdc++ when using older standards, as it doesn't use SSO but COW and thus even short
strings are expensive to first create.
* Various places now use char literal instead of string literals containing single char.
** `startsWith` and `endsWith` now also have overload that takes single char.

Generally the performance improvements under VS2015 are small, as going from short string
to char is mostly meaningless because of SSO (Catch doesn't push string handling that hard)
and previous commit removed most string handling if tests pass, which is the expect case.
2017-01-15 10:05:01 +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
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 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 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 02e1966db3 Changed --filenames-as-tags prefix to #, added -# as short form and updated docs 2015-07-06 18:46:50 +01:00
Phil Nash 088c5bc53e --filenames-as-tags 2015-07-02 08:20:18 +01: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 fa0122bf54 Allow testing ordering to be specified as declaration, lexicographical, or random. Allow random seed to be specified 2014-09-15 18:39:31 +01:00
Phil Nash a31f05fe83 Removed C-style casts 2014-07-09 07:35:34 +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 e8aa0bb19b Fixed issue with reading test names from file 2014-05-19 18:20:44 +01:00
Phil Nash 7059b2cdac Added ability to show “invisibles” in strings (just tabs and newline chars, for now). 2014-04-22 18:23:42 +01:00
Phil Nash 472dc2a61f New version of Clara
- interface changed slightly
- moved clara.h and tbc_text_format.h into “external” folder
2014-03-17 18:40:58 +00:00
Phil Nash b9fea75109 New version of Clara.
- updated command line setup with new API
- updated STITCH macros
- force embedded Clara to use Catch’s console width (but restore it after)
- remove command line tests (as these have now moved into the Clara project)
2014-03-06 08:16:06 +00:00
Phil Nash 4554155e3d Made Clara a “Cliche” header, which will be usable independently of Catch.
- This is just a first step. It still has a dependency on catch_text.h, which also needs to be made a Cliche header.
- These then need their own homes on GitHub.
2014-02-10 17:20:30 +00:00
Phil Nash 782c2b5891 Added ability to load names of tests to run from a file
- use -f to specify filename. Blank lines and lines starting with # are ignored
- also added --list-test-names-only to list test names out to file in a form that can be immediate read in by -f
2013-11-26 20:57:34 +00:00
Phil Nash 1870ca8455 Some Clara/ command line clean-up and tweaks 2013-08-16 18:57:57 +01:00
Phil Nash 6339254cb2 First cut of Timer class.
- started integrating with reporters (now (optionally) supported in console reporter).
- introduced Node<> template to help with cumulative reporting and used it instead of ThreadedSectionInfo.
2013-08-07 18:56:35 +01:00
Phil Nash f3d1f08c3b Removed all trailing whitespace
- addresses #105
2013-07-03 19:14:59 +01:00
Phil Nash a76d93ad54 Removed filename from --reporter option
(it's not implemented yet)
2013-06-26 08:42:05 +01:00
Phil Nash 7d5f2715ce Fixed script for new readme
- updated README with new version
- fixed casing error for -e opt description
2013-06-07 21:15:25 +01:00
Phil Nash e035e2835d tweaks 2013-06-06 18:56:43 +01:00
Phil Nash 2ed56c47a6 Removed legacy cli parser 2013-06-04 08:38:40 +01:00
Phil Nash aee9b75e37 Now fully switched over to Clara-based command line with modified args 2013-06-04 08:37:28 +01:00
Phil Nash 0514fe4f38 Got parseCommandLine ready to use new Clara (but not doing so yet) 2013-05-31 18:48:31 +01:00
Phil Nash c9f0f55451 Last changes to ConfigData names (for now) 2013-05-31 08:01:56 +01:00
Phil Nash 40e529740c Removed stream name from config 2013-05-29 19:06:25 +01:00
Phil Nash 20ddb0055f ConfigData just keeps strings for test names/ specs/ tags (processed in Config actor) 2013-05-29 18:56:29 +01:00
Phil Nash c2ca80d9fb Config refactoring: split List enum into three bools 2013-05-29 18:42:46 +01:00
Phil Nash 3c3beb57c3 More config refactoring 2013-05-29 18:34:11 +01:00
Phil Nash bf37e6879a Removed use of compiler specific techniques for denoting non-returning functions
- use if( Catch::isTrue( true) ) to guard throws instead
2013-04-23 20:52:49 +01:00
Phil Nash 2a9d8d9e36 Changed "const X ref"s to "X const ref"s
- Brought older code up to current convention (with the help of a Python script)
2013-04-23 18:58:56 +01:00
Phil Nash e324d2829d Added -l tags
- which lists available tags.
- also improved formatting of -l for tests
2013-03-29 11:42:10 +00:00
Phil Nash 3453639732 tags can be specified using -t (or as default command)
Previously -g had to be used
2013-03-21 08:59:05 +00:00
Phil Nash 207b27b3c5 Changed the way info messages are handled.
This fixes issue with SCOPED_INFO and makes output more readable.
Needs some refactoring.
2013-02-02 19:58:04 +00:00
Phil Nash 42aef1d99c Fairly major reworking of console reporter (still in progress).
Changed reporter interface a bit.
2013-01-13 21:51:44 +00:00
Phil Nash 8b71158540 Fixed reference to basic reporter (to console reporter) 2012-12-14 18:17:47 +00:00