From 5a75c40c5f084a517ef647b40ae1b94f7536aa54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thorben=20H=C3=B6hne?= Date: Tue, 24 Jun 2025 20:51:54 +0200 Subject: [PATCH] fix: Type error in SETUP macro. --- set.h | 2 +- testtest.c | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/set.h b/set.h index 917c47a..3e45588 100644 --- a/set.h +++ b/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() \ diff --git a/testtest.c b/testtest.c index 876b394..a4042af 100644 --- a/testtest.c +++ b/testtest.c @@ -1,4 +1,5 @@ #include "set.h" +#include #include #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);