Commits

Matt Oswald  committed 1674a2a

adding some (const char *, const std::string &) variants to the Assert/Check classes

  • Participants
  • Parent commits 6b066d5

Comments (0)

Files changed (2)

File xUnit++/src/xUnitAssert.cpp

     return Equal(std::string(expected), std::string(actual), lineInfo);
 }
 
+xUnitFailure Assert::Equal(const char *expected, const std::string &actual, const LineInfo &lineInfo) const
+{
+    return Equal(std::string(expected), actual, lineInfo);
+}
+
 xUnitFailure Assert::Equal(const std::string &expected, const char *actual, const LineInfo &lineInfo) const
 {
     return Equal(expected, std::string(actual), lineInfo);
     return DoesNotContain(std::string(actualString), std::string(value), lineInfo);
 }
 
+xUnitFailure Assert::DoesNotContain(const char *actualString, const std::string &value, const LineInfo &lineInfo) const
+{
+    return DoesNotContain(std::string(actualString), value, lineInfo);
+}
+
 xUnitFailure Assert::DoesNotContain(const std::string &actualString, const char *value, const LineInfo &lineInfo) const
 {
     return DoesNotContain(actualString, std::string(value), lineInfo);
     return Contains(std::string(actualString), std::string(value), lineInfo);
 }
 
+xUnitFailure Assert::Contains(const char *actualString, const std::string &value, const LineInfo &lineInfo) const
+{
+    return Contains(std::string(actualString), std::string(value), lineInfo);
+}
+
 xUnitFailure Assert::Contains(const std::string &actualString, const char *value, const LineInfo &lineInfo) const
 {
     return Contains(actualString, std::string(value), lineInfo);

File xUnit++/xUnit++/xUnitAssert.h

     }
 
     xUnitFailure Equal(const char *expected, const char *actual, const LineInfo &lineInfo = LineInfo::empty()) const;
+    xUnitFailure Equal(const char *expected, const std::string &actual, const LineInfo &lineInfo = LineInfo::empty()) const;
     xUnitFailure Equal(const std::string &expected, const char *actual, const LineInfo &lineInfo = LineInfo::empty()) const;
     xUnitFailure Equal(const std::string &expected, const std::string &actual, const LineInfo &lineInfo = LineInfo::empty()) const;
     xUnitFailure Equal(float expected, float actual, int precision, const LineInfo &lineInfo = LineInfo::empty()) const;
     }
 
     xUnitFailure DoesNotContain(const char *actualString, const char *value, const LineInfo &lineInfo = LineInfo::empty()) const;
+    xUnitFailure DoesNotContain(const char *actualString, const std::string &value, const LineInfo &lineInfo = LineInfo::empty()) const;
     xUnitFailure DoesNotContain(const std::string &actualString, const char *value, const LineInfo &lineInfo = LineInfo::empty()) const;
     xUnitFailure DoesNotContain(const std::string &actualString, const std::string &value, const LineInfo &lineInfo = LineInfo::empty()) const;
 
     }
 
     xUnitFailure Contains(const char *actualString, const char *value, const LineInfo &lineInfo = LineInfo::empty()) const;
+    xUnitFailure Contains(const char *actualString, const std::string &value, const LineInfo &lineInfo = LineInfo::empty()) const;
     xUnitFailure Contains(const std::string &actualString, const char *value, const LineInfo &lineInfo = LineInfo::empty()) const;
     xUnitFailure Contains(const std::string &actualString, const std::string &value, const LineInfo &lineInfo = LineInfo::empty()) const;