1
0
mirror of https://github.com/falk-werner/webfuse synced 2024-10-27 20:34:10 +00:00
falk-werner_webfuse/test-src/test_util.h

32 lines
511 B
C
Raw Normal View History

2019-01-27 02:45:03 +00:00
#ifndef _WSFS_TEST_UTIL_H
#define _WSFS_TEST_UTIL_H
#define ASSERT_EQ(expected, actual) \
do \
{ \
if ((expected) != (actual)) \
{ \
fail(__FILE__, __LINE__, "expected " #expected ", but was " #actual); \
} \
} \
while (0)
#define ASSERT_NE(expected, actual) \
do \
{ \
if ((expected) == (actual)) \
{ \
fail(__FILE__, __LINE__, "expected " #expected ", but was " #actual); \
} \
} \
while (0)
extern void fail(
char const * file_name,
int line,
char const * message
);
#endif