diff --git a/test/unit/unittest.h b/test/unit/unittest.h new file mode 100644 index 0000000..165cb64 --- /dev/null +++ b/test/unit/unittest.h @@ -0,0 +1,12 @@ +/* Copyright (c) 2023 Barcelona Supercomputing Center (BSC) + * SPDX-License-Identifier: GPL-3.0-or-later */ + +#ifndef UNITTEST_H +#define UNITTEST_H + +#include "common.h" + +#define OK(x) do { if ((x) != 0) { die(#x " failed"); } } while (0) +#define ERR(x) do { if ((x) == 0) { die(#x " didn't fail"); } } while (0) + +#endif /* UNITTEST_H */