Port to macOS

Signed-off-by: Simon Rozman <simon@rozman.si>
This commit is contained in:
Simon Rozman
2023-09-19 18:02:18 +02:00
parent 27afd7afa5
commit b5984ea8f2
7 changed files with 101 additions and 35 deletions

View File

@@ -34,6 +34,14 @@ namespace Assert
throw std::runtime_error("not equal");
}
template <class T, size_t N>
inline void AreEqual(const T (&a)[N], const T (&b)[N])
{
for (size_t i = 0; i < N; ++i)
if (!(a[i] == b[i]))
throw std::runtime_error("not equal");
}
inline void AreEqual(const char* a, const char* b)
{
if (strcmp(a, b) != 0)