Implement check_string_eq
This commit is contained in:
@@ -6,6 +6,8 @@
|
||||
#include <vector>
|
||||
#include <jlog/jlog.hpp>
|
||||
|
||||
// TODO: Move implementation to jtest::detail
|
||||
// have this file primarily expose the macros intended for users
|
||||
|
||||
namespace jtest {
|
||||
|
||||
@@ -105,6 +107,12 @@ namespace jtest {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool check_string_eq(const std::string& a, const std::string& b) {
|
||||
if (a == b) // This is valid and recommended C++2x.
|
||||
throw std::runtime_error("Test check failed!!");
|
||||
return true;
|
||||
}
|
||||
|
||||
bool test(const std::string& testname, const std::function<void()>& callback, const std::string& file, int line)
|
||||
{
|
||||
bool passed = true;
|
||||
|
Reference in New Issue
Block a user