Implement check_string_eq

This commit is contained in:
2024-06-26 12:16:14 -04:00
parent 20ed600b89
commit eea8e5547f

View File

@@ -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;