ulib/3party/rpc_core/test/assert_def.h

13 lines
274 B
C
Raw Normal View History

2024-01-21 16:05:01 +08:00
#pragma once
#include <cstdio>
#include <cstdlib>
// clang-format off
#define __ASSERT(e, file, line) \
((void)printf ("%s:%d: failed assertion `%s'\n", file, line, e), abort())
#define ASSERT(e) \
((void) ((e) ? ((void)0) : __ASSERT (#e, __FILE__, __LINE__)))