stickfosh/cpp/tests/lib.hpp

17 lines
932 B
C++
Raw Permalink Normal View History

#pragma once
#include <iostream>
2025-02-02 22:04:41 +01:00
#define ASSERT_EQUALS(x, y) \
{ \
2025-02-02 22:04:41 +01:00
auto expected = x; \
auto actual = y; \
2025-02-02 21:39:02 +01:00
if (expected != actual) { \
std::cerr << "Expected: " << std::endl \
<< '\t' << expected << std::endl \
<< "Got: " << std::endl \
<< '\t' << actual << std::endl; \
2025-02-02 21:39:02 +01:00
exit(1); \
} \
}