Commit Graph

485 Commits

Author SHA1 Message Date
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
649f8c24b1 Removed now redundant handling for missing assertions in test cases
- handled as part of sections
2013-07-26 19:28:34 +01:00
Phil Nash
e8cf726a23 Refactored missing assertions handling 2013-07-26 19:26:08 +01:00
Phil Nash
b80280f428 Tidied up reporting of missing assertions in test cases
- also removed basic reporter from approval test
2013-07-26 19:19:44 +01:00
Phil Nash
801672b962 Fix MSVC warning 2013-07-25 08:18:09 +01:00
Phil Nash
8a52a39fdc Build 6
- fixes infinite loop bug (#185 and #166)
2013-07-25 08:12:03 +01:00
Phil Nash
28d3881ff9 Merged TestCaseTracker and SectionTracker and introduced TestCaseTracker::Guard 2013-07-25 08:07:55 +01:00
Phil Nash
ee647f5099 Removed displaced RunningTest class 2013-07-25 07:49:00 +01:00
Phil Nash
9aff9aa328 Integrated new section tracker.
- also pass extra section to reporter - one for each test case - ignore it in headers
  (this is so we know a test case has restarted)
- significant effect on regression test due to change of ordering of sections
- fixes infinite loop issue
2013-07-24 19:13:08 +01:00
Phil Nash
6a484fdb02 Reworked SectionTracker and moved into own header 2013-07-23 18:48:36 +01:00
Phil Nash
372a6c6fed Small fixes and started new section tracking code 2013-07-23 08:15:34 +01:00
Phil Nash
f3d1f08c3b Removed all trailing whitespace
- addresses #105
2013-07-03 19:14:59 +01:00
Phil Nash
503d5d0c8e Converted stray tabs to spaces 2013-07-03 08:25:11 +01:00
Phil Nash
ad7445d33c build 5
- added throw() to streambuf destructor overrides (#182)
2013-07-02 08:49:29 +01:00
Phil Nash
3907559896 build 4 2013-07-01 19:02:29 +01:00
Phil Nash
066a6388d6 Fix for #179 2013-07-01 18:45:19 +01:00
Phil Nash
ba9b2b5a37 Use MFCs windows include if present 2013-07-01 18:44:40 +01:00
Phil Nash
4b5e008b20 guard NOMINMAX definition (windows) 2013-06-29 20:31:17 +01:00
Phil Nash
cd688300b0 Build 2 2013-06-29 12:11:32 +01:00
Phil Nash
5d26ca1af7 Static assertion for && and || expressions 2013-06-29 12:07:33 +01:00
Phil Nash
b5fd5a6496 INFO and CAPTURE are now scoped
- SCOPED_INFO and SCOPED_CAPTURE are now just aliases
2013-06-28 17:09:57 +01:00
Phil Nash
0d357302a0 INFOs only reset at assertion if consumed 2013-06-28 16:25:49 +01:00
Phil Nash
9c39a5e8dd Support [.] as alias for [hide] 2013-06-28 16:05:13 +01:00
Phil Nash
235204393a Big merge from Integration
- now v1.0 build 1
2013-06-28 14:11:28 +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
5ddd6e31e4 Added #define NOMINMAX
- thanks to @robson3 in #171
2013-06-14 19:18:13 +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
786959d535 build 39 2013-06-07 19:07:50 +01:00
Phil Nash
11381c146c Tweaked indentation of errors and test lists 2013-06-07 19:06:30 +01:00
Phil Nash
27cae858d0 Use Text formatter to list reporters 2013-06-07 18:56:43 +01:00
Phil Nash
80557647d6 re-encapsulated session vars.
- construct Config object lazily
2013-06-07 18:41:22 +01:00
Phil Nash
8fde14313b Session vars are public 2013-06-07 08:04:05 +01:00
Phil Nash
f438e04b5d list options return number listed 2013-06-06 22:54:42 +01:00
Phil Nash
e035e2835d tweaks 2013-06-06 18:56:43 +01:00
Phil Nash
a7e657fd9b Refactored new Session class to make it more friendly for custom client code 2013-06-06 18:51:24 +01:00
Phil Nash
c1196b6245 Moved all Catch::Main()s into new Session class
- renamed them run()
- moved cleanUp call into destructor
2013-06-05 18:48:18 +01:00
Phil Nash
cb60d130f8 Runner -> RunContext, Runner2 -> Runner and fixed issue with processName 2013-06-05 08:18:52 +01:00
Phil Nash
1b47e11387 Added processConfig() method 2013-06-04 22:49:14 +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
f330fe7ef9 Made generated function name more obvious (for quickly finding in debugger's stack viewer) 2013-05-31 08:11:01 +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
3f184e22e8 ConfigData now looks virtually identical to the Clara test Config 2013-05-29 19:01:06 +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
be8fd82f20 Started nudging ConfigData towards new layout 2013-05-29 08:12:57 +01:00
Phil Nash
f6892bfdf0 Listing is now in terms of interface (and calls to bool functions) 2013-05-29 07:59:01 +01:00
Phil Nash
6b8837bd93 Final refactoring to remove direct access to encapsulated ConfigData once in Config 2013-05-28 19:07:29 +01:00
Phil Nash
43fe6c6e9e Main() functions deal with raw ConfigData 2013-05-28 18:59:29 +01:00
Phil Nash
ca9b92f8fa Most of system now uses Ptr<IConfig const> 2013-05-28 18:51:53 +01:00
Phil Nash
e1459955f1 Refactoring towards interface based config 2013-05-28 18:39:32 +01:00
Phil Nash
10fa0593db Moved Clara into its (her?) own file 2013-05-27 10:52:58 +01:00
Phil Nash
d4305377b7 Fixed inconsistency in reporting of _FALSE (negated) expressions 2013-05-17 19:35:33 +01:00
Phil Nash
597ed1f79d handle TEST_CASE_METHOD macro consistently
- internally define INTERNAL_CATCH_TEST_CASE_METHOD
2013-05-14 19:31:21 +01:00
Phil Nash
8defc71e6d Build 38 2013-04-24 19:10:02 +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
d0d4d93a6b Build 37
- string matchers work with NULLs
- removed stray CATCH_CONFIG_SFINAE for GCC 3
2013-04-23 08:02:48 +01:00
Phil Nash
06548a5b61 Fix for #144
- string matchers now work with NULLs
2013-04-23 07:59:56 +01:00
Phil Nash
c887d1a167 Removed rogue CATCH_CONFIG_SFINAE for GCC 3.x 2013-04-22 22:20:42 +01:00
Phil Nash
471eba2c32 Build 36
- incorporation of pull request #154 to allow comparison with nullptr_t
- some compiler capability tweaks
2013-04-22 18:55:12 +01:00
Phil Nash
4dd3f68dd9 Compiler capabilities clean-up
- renamed CATCH_SFINAE -> CATCH_CONFIG_SFINAE
- moved variadic macros detection into catch_compiler_capabilities.h
2013-04-22 08:19:17 +01:00
Phil Nash
dd52044374 Build 35
- non-SFINAE IsStreamInsertable
2013-04-20 23:20:05 +01:00
Phil Nash
9fff9e47d3 Complete disable CATCH_SFINAE for now 2013-04-20 23:18:44 +01:00
Phil Nash
003960dc90 Returned to older version of IsStreamable
- this time based on code from Martin Moene
https://gist.github.com/martinmoene/5418947#file-insertionopdetector-cpp
2013-04-20 23:12:17 +01:00
Phil Nash
19279250e8 Build 34
includes:
- SFINAE version of IsStreamable (where available)
- new Text class that replaces LineWrapper (internal)
- fix for spurious double exception reporting (#164)
2013-04-20 21:07:32 +01:00
Phil Nash
2666c96d4e Fixes issue #164
- Removed spurious (re-)throw when catching unexpected exception
2013-04-20 21:04:32 +01:00
Phil Nash
b3acf45d70 Fully committed to new Text class.
- moved impl into .hpp
- replaced last few uses of LineWrapper with Text
- removed LineWrapper
2013-04-20 19:36:40 +01:00
Phil Nash
97d99852a8 Refactored line wrapping in Text constructor a bit 2013-04-20 18:41:00 +01:00
Phil Nash
54ca219aad Text class is now full replacement for LineWrap 2013-04-20 11:27:28 +01:00
Phil Nash
7059c6e1c3 Text class mostly working
- tabs not yet working
2013-04-19 19:08:32 +01:00
Phil Nash
052dc18c76 Remove SFINAE support for all unknown compilers 2013-04-18 07:40:19 +01:00
Phil Nash
bd5910ef9f Moved line info in header again 2013-04-17 00:05:25 +01:00
Phil Nash
5062d3e92b Added (conditional) SFINAE support.
Better streamable detection for toString using SFINAE (falls back to non-SFINAE version without)
2013-04-16 22:55:31 +01:00
Phil Nash
243f2d2caf build 33 2013-04-12 10:43:06 +01:00
Phil Nash
cd9c72c66f Fixed BrightGreen in ANSI/ Posix case
- was yellow :-s
2013-04-09 19:49:58 +01:00
Phil Nash
1c03b4a363 Exclude VS2005 from using variadic macros
- due to issues raised in https://groups.google.com/forum/?fromgroups=#!topic/catch-forum/VGfNtNXjHXQ
2013-04-09 08:19:04 +01:00
Phil Nash
1ece38ed20 Moved legacy_reporter_adapter files back into internal 2013-04-08 21:36:08 +01:00
Phil Nash
3bd4241795 Fixed Junit issue with REQUIRE_THROWS
- As mentioned by @SebDyn in GitHub issue #5
2013-04-08 12:05:32 +01:00
Phil Nash
8764177c0e build 32 2013-04-08 11:50:41 +01:00
Phil Nash
7af7451f78 LegacyReporterAdapter unbundles INFO messages from assertion to mimic legacy behaviour
- Moved LegacyReporterAdapter out into its own file(s)
2013-04-08 11:44:03 +01:00
Phil Nash
12c16fff8d Build 31
- new Colour class
- Headers are wrapped, with special indentation for given/ when/ then
2013-04-05 20:58:01 +01:00
Phil Nash
4746caacaf LineWrapper can indent first line differently to subsequent lines
- use this to wrap Given/ When/ Then with indent after the :
2013-04-05 20:55:57 +01:00
Phil Nash
f186a912d4 Switched TextColour out for Colour
- Removed TextColour
2013-04-05 07:59:28 +01:00
Phil Nash
a3703faa0a First cut of new Colour class (to replace TextColour) 2013-04-05 07:47:36 +01:00
Phil Nash
5c7d3d75cc build 30 2013-04-01 11:27:10 +01:00
Phil Nash
2c90533a26 More formatting/ colour tweaks 2013-04-01 11:25:54 +01:00
Phil Nash
67e9f01d38 Added some more wrap chars 2013-04-01 10:30:36 +01:00
Phil Nash
2a17ef9081 Use SecondaryText code in lists 2013-03-29 21:55:19 +00:00
Phil Nash
c7e602f3f2 Added SecondaryText colour enum
- slightly refactored ConsoleColour as well
2013-03-29 21:39:43 +00:00
Phil Nash
38f7eef6fe build 29 2013-03-29 13:44:33 +00: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
15fd032608 Use new line wrapper to show test case list, with tags, in columns 2013-03-28 22:13:31 +00:00
Phil Nash
9e8abc33e7 Simplified StringWrapper
- by changing intoStream to << overload
- and removing redundant ctor
2013-03-27 23:36:58 +00:00
Phil Nash
b052bd729a Refactored string wrapper
- to be much more flexible (writes to vector)
- fixed a couple of bugs
2013-03-27 19:08:16 +00:00
Phil Nash
dd26e889b5 Build 28 2013-03-25 09:25:31 +00:00
Phil Nash
c563f6b1be Wrap expr results if they contain newlines 2013-03-25 09:24:13 +00:00