parent
f47868ded7
commit
7f8365811f
@ -1 +1,2 @@
|
||||
.vscode
|
||||
.build
|
||||
|
@ -1,13 +0,0 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "test_util.h"
|
||||
#include "wsfs/util.h"
|
||||
|
||||
extern void test_request_parser();
|
||||
|
||||
int main(int WSFS_UNUSED_PARAM(argc), char* WSFS_UNUSED_PARAM(argv[]))
|
||||
{
|
||||
test_request_parser();
|
||||
return EXIT_SUCCESS;
|
||||
}
|
@ -1,15 +0,0 @@
|
||||
#include "test_util.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
void fail(
|
||||
char const * file_name,
|
||||
int line,
|
||||
char const * message
|
||||
)
|
||||
{
|
||||
fprintf(stderr, "error: %s:%d: %s\n", file_name, line, message);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
@ -1,31 +0,0 @@
|
||||
#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
|
||||
|
Loading…
Reference in new issue