refactor(test): use simpler ASSERT wrapper

This commit is contained in:
Johann Dreo 2022-08-29 09:47:58 +02:00
commit be48aad4ec
2 changed files with 6 additions and 6 deletions

View file

@ -4,26 +4,26 @@
#include "../clutchlog/clutchlog.h"
// Make asserts (de)clutchable.
#define ASSERT(LEVEL, ...) CLUTCHFUNC(LEVEL, assert, __VA_ARGS__);
#define ASSERT(...) CLUTCHFUNC(error, assert, __VA_ARGS__);
void h()
{
CLUTCHLOG(info, "!");
ASSERT(info, true == true);
ASSERT(true == true);
std::clog << "--" << std::endl;
}
void g()
{
CLUTCHLOG(warning, "world");
ASSERT(warning, strcmp("life","life") == 0);
ASSERT(strcmp("life","life") == 0);
h();
}
void f()
{
CLUTCHLOG(error, "hello ");
ASSERT(error, strcmp("no more","please")!=0);
ASSERT(strcmp("no more","please")!=0);
g();
}