1
0
mirror of https://github.com/falk-werner/webfuse-provider synced 2024-10-27 20:44:10 +00:00
falk-werner_webfuse-provider/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