Progmasoft Git

catch3

Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.

Clonegit clone https://git.progmasoft.com/catch3

Use UDLs to construct StringRefs for decomposed operators directly

Commit
b93cf932fb4657ae650f38b5427e01553c7de2e6
Author
Martin Hořeňovský ·
Parents
eef6c9b79b43

Files · Download .tar.gz

Changes

 src/catch2/internal/catch_decomposer.hpp | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/src/catch2/internal/catch_decomposer.hpp b/src/catch2/internal/catch_decomposer.hpp
index 260a3f78..6ed828b9 100644
--- a/src/catch2/internal/catch_decomposer.hpp
+++ b/src/catch2/internal/catch_decomposer.hpp
@@ -178,47 +178,47 @@ namespace Catch {
 
         template<typename RhsT>
         auto operator == ( RhsT const& rhs ) -> BinaryExpr<LhsT, RhsT const&> const {
-            return { compareEqual( m_lhs, rhs ), m_lhs, "==", rhs };
+            return { compareEqual( m_lhs, rhs ), m_lhs, "=="_sr, rhs };
         }
         auto operator == ( bool rhs ) -> BinaryExpr<LhsT, bool> const {
-            return { m_lhs == rhs, m_lhs, "==", rhs };
+            return { m_lhs == rhs, m_lhs, "=="_sr, rhs };
         }
 
         template<typename RhsT>
         auto operator != ( RhsT const& rhs ) -> BinaryExpr<LhsT, RhsT const&> const {
-            return { compareNotEqual( m_lhs, rhs ), m_lhs, "!=", rhs };
+            return { compareNotEqual( m_lhs, rhs ), m_lhs, "!="_sr, rhs };
         }
         auto operator != ( bool rhs ) -> BinaryExpr<LhsT, bool> const {
-            return { m_lhs != rhs, m_lhs, "!=", rhs };
+            return { m_lhs != rhs, m_lhs, "!="_sr, rhs };
         }
 
         template<typename RhsT>
         auto operator > ( RhsT const& rhs ) -> BinaryExpr<LhsT, RhsT const&> const {
-            return { static_cast<bool>(m_lhs > rhs), m_lhs, ">", rhs };
+            return { static_cast<bool>(m_lhs > rhs), m_lhs, ">"_sr, rhs };
         }
         template<typename RhsT>
         auto operator < ( RhsT const& rhs ) -> BinaryExpr<LhsT, RhsT const&> const {
-            return { static_cast<bool>(m_lhs < rhs), m_lhs, "<", rhs };
+            return { static_cast<bool>(m_lhs < rhs), m_lhs, "<"_sr, rhs };
         }
         template<typename RhsT>
         auto operator >= ( RhsT const& rhs ) -> BinaryExpr<LhsT, RhsT const&> const {
-            return { static_cast<bool>(m_lhs >= rhs), m_lhs, ">=", rhs };
+            return { static_cast<bool>(m_lhs >= rhs), m_lhs, ">="_sr, rhs };
         }
         template<typename RhsT>
         auto operator <= ( RhsT const& rhs ) -> BinaryExpr<LhsT, RhsT const&> const {
-            return { static_cast<bool>(m_lhs <= rhs), m_lhs, "<=", rhs };
+            return { static_cast<bool>(m_lhs <= rhs), m_lhs, "<="_sr, rhs };
         }
         template <typename RhsT>
         auto operator | (RhsT const& rhs) -> BinaryExpr<LhsT, RhsT const&> const {
-            return { static_cast<bool>(m_lhs | rhs), m_lhs, "|", rhs };
+            return { static_cast<bool>(m_lhs | rhs), m_lhs, "|"_sr, rhs };
         }
         template <typename RhsT>
         auto operator & (RhsT const& rhs) -> BinaryExpr<LhsT, RhsT const&> const {
-            return { static_cast<bool>(m_lhs & rhs), m_lhs, "&", rhs };
+            return { static_cast<bool>(m_lhs & rhs), m_lhs, "&"_sr, rhs };
         }
         template <typename RhsT>
         auto operator ^ (RhsT const& rhs) -> BinaryExpr<LhsT, RhsT const&> const {
-            return { static_cast<bool>(m_lhs ^ rhs), m_lhs, "^", rhs };
+            return { static_cast<bool>(m_lhs ^ rhs), m_lhs, "^"_sr, rhs };
         }
 
         template<typename RhsT>