Commit Graph

21 Commits

Author SHA1 Message Date
Phil Nash
a5a013811c Renamed toStringUncached -> describe 2017-02-14 09:16:54 +00:00
Phil Nash
7fed25ad1f New Matchers implementation
- simpler
- less templates and machinery
- no cloning, copying or unnecessary heap allocations
- better factored
2017-02-14 09:16:54 +00: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ý
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
b84e08ad6f Fix EndsWith Matcher (and refactored EndsWith and StartsWith in terms of endsWith and startsWith) (see Issue #573) 2016-01-22 07:59:06 +00:00
Phil Nash
722315a1f5 Removed some trailing whitespace 2015-12-04 10:20:33 +00:00
Phil Nash
d10b73f9f1 changed Not struct to a class.
- it was forward declared as a class, which caused warnings on some compilers. It should really have been a class anyway.
- this addresses the same issue as PR #534, albeit from the other angle.
2015-11-06 18:07:29 +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
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
d234ed1a67 dev build 13 2015-08-24 06:28:25 +01:00
Simon Warta
312b94e532 Add matcher: Not() 2015-08-12 11:07:55 +02:00
Phil Nash
72868920bb Exception message assertions now work with matchers 2015-07-15 23:02:25 +01:00
Phil Nash
f3d1f08c3b Removed all trailing whitespace
- addresses #105
2013-07-03 19:14:59 +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
06548a5b61 Fix for #144
- string matchers now work with NULLs
2013-04-23 07:59:56 +01:00
Phil Nash
442463473d Updated obj-c bindings for new Matchers and TestCaseInfo changes 2012-12-06 08:41:38 +00:00
Phil Nash
9444bbcb7b Added AllOf and AnyOf matchers 2012-10-12 07:58:17 +01:00
Phil Nash
1c98fc98ef Added Equals matcher for strings 2012-05-24 08:27:50 +01:00
Phil Nash
2efc1146bf Reformatting 2012-05-15 07:42:26 +01:00
Phil Nash
e0dd4a5469 Sanitised some comments 2012-05-09 19:37:14 +01:00
Phil Nash
a6a40b3ba9 Added a handful of "built-in" matchers 2012-03-04 20:10:36 +00:00