Commit Graph

12 Commits

Author SHA1 Message Date
Martin Hořeňovský 4fe2432e05 Rework of REQUIRE* changes in CATCH_CONFIG_FAST_COMPILE
`ResultBuilder`s destructor now checks for exceptions, preventing false
negatives. The speedup should remain the same give or take a tiny bit.
2017-03-29 21:12:06 +02: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
Phil Nash 2b74613c54 Revert "First cut of Evaluate refactoring to remove int specialisations, among other things"
This reverts commit 39753558eb.
2017-02-06 22:37:23 +00:00
Phil Nash 39753558eb First cut of Evaluate refactoring to remove int specialisations, among other things 2017-02-06 15:15:43 +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
Mickey Rose a1e9b841ff lazily stringify expressions 2017-01-14 21:56:16 +01: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 72868920bb Exception message assertions now work with matchers 2015-07-15 23:02:25 +01:00
Phil Nash 85de743d70 Added _THROWS_WITH macros
- asserts on exception message
2015-07-13 06:34:41 +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 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