aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests
diff options
context:
space:
mode:
authorSimon Warta <[email protected]>2015-08-08 18:04:24 +0200
committerSimon Warta <[email protected]>2015-08-11 10:50:14 +0200
commite1c927afcee6c7ae95b0ccaa0169a05776aa63db (patch)
treedc80ad1456f820da5dee166447951ebe5125a1e0 /src/tests
parent3a85d9aa4da36e7ca46e370f4fe65dddc43f4172 (diff)
Minor refactoring of existing Matchers
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/catchy/catchy_tests.h17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/tests/catchy/catchy_tests.h b/src/tests/catchy/catchy_tests.h
index f1170fa71..c60a790d9 100644
--- a/src/tests/catchy/catchy_tests.h
+++ b/src/tests/catchy/catchy_tests.h
@@ -21,11 +21,12 @@ namespace Matchers {
namespace StdVector {
template<typename T, typename Alloc>
- struct Equals : MatcherImpl<Equals<T, Alloc>, std::vector<T, Alloc> > {
+ struct Equals : MatcherImpl<Equals<T, Alloc>, std::vector<T, Alloc> >
+ {
Equals( std::vector<T, Alloc> const& vec ) : m_vector( vec ){}
Equals( Equals const& other ) : m_vector( other.m_vector ){}
- virtual ~Equals() {};
+ virtual ~Equals() {}
virtual bool match( std::vector<T, Alloc> const& expr ) const {
return m_vector == expr;
@@ -39,17 +40,18 @@ namespace Matchers {
} // namespace StdVector
namespace Boolean {
- struct Equals : MatcherImpl<Equals, bool> {
+ struct Equals : MatcherImpl<Equals, bool>
+ {
Equals( const bool expected ) : m_expected( expected ){}
Equals( Equals const& other ) : m_expected( other.m_expected ){}
- virtual ~Equals() override {};
+ virtual ~Equals() override {}
virtual bool match( bool const& expr ) const {
return m_expected == expr;
}
virtual std::string toString() const {
- return " == " + Catch::toString(m_expected);
+ return "== " + Catch::toString(m_expected);
}
bool m_expected;
@@ -58,11 +60,12 @@ namespace Matchers {
namespace Integer {
template<typename T>
- struct Equals : MatcherImpl<Equals<T>, T> {
+ struct Equals : MatcherImpl<Equals<T>, T>
+ {
Equals( const T expected ) : m_expected( expected ){}
Equals( Equals const& other ) : m_expected( other.m_expected ){}
- virtual ~Equals() override {};
+ virtual ~Equals() override {}
virtual bool match( T const& expr ) const {
return m_expected == expr;