fix: Type error in SETUP macro.
This commit is contained in:
2
set.h
2
set.h
@@ -38,7 +38,7 @@ bool set_up();
|
||||
|
||||
bool tear_down();
|
||||
|
||||
#define SETUP() void set_up()
|
||||
#define SETUP() bool set_up()
|
||||
#define TEAR_DOWN() bool tear_down()
|
||||
|
||||
#define BUNDLE() \
|
||||
|
13
testtest.c
13
testtest.c
@@ -1,4 +1,5 @@
|
||||
#include "set.h"
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "set_asserts.h"
|
||||
@@ -12,6 +13,18 @@ int fac(int n)
|
||||
|
||||
void heavy_load() { sleep(5); }
|
||||
|
||||
SETUP()
|
||||
{
|
||||
printf("Setting up.\n");
|
||||
return true;
|
||||
}
|
||||
|
||||
TEAR_DOWN()
|
||||
{
|
||||
printf("Ending execution.!");
|
||||
return false;
|
||||
}
|
||||
|
||||
TEST(Faculty_Basic)
|
||||
{
|
||||
ASSERT_EQ(fac(5), 120);
|
||||
|
Reference in New Issue
Block a user