fix: Type error in SETUP macro.

This commit is contained in:
2025-06-24 20:51:54 +02:00
parent cbec16baa2
commit 5a75c40c5f
2 changed files with 14 additions and 1 deletions

2
set.h
View File

@@ -38,7 +38,7 @@ bool set_up();
bool tear_down(); bool tear_down();
#define SETUP() void set_up() #define SETUP() bool set_up()
#define TEAR_DOWN() bool tear_down() #define TEAR_DOWN() bool tear_down()
#define BUNDLE() \ #define BUNDLE() \

View File

@@ -1,4 +1,5 @@
#include "set.h" #include "set.h"
#include <stdio.h>
#include <unistd.h> #include <unistd.h>
#include "set_asserts.h" #include "set_asserts.h"
@@ -12,6 +13,18 @@ int fac(int n)
void heavy_load() { sleep(5); } void heavy_load() { sleep(5); }
SETUP()
{
printf("Setting up.\n");
return true;
}
TEAR_DOWN()
{
printf("Ending execution.!");
return false;
}
TEST(Faculty_Basic) TEST(Faculty_Basic)
{ {
ASSERT_EQ(fac(5), 120); ASSERT_EQ(fac(5), 120);