From 4c42453d856053bb49affef7c165397e5c16d9eb Mon Sep 17 00:00:00 2001 From: Vincent Douillet Date: Sun, 5 Dec 2021 21:28:14 +0100 Subject: day 5 --- input.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'input.h') diff --git a/input.h b/input.h index 6507053..d386da0 100644 --- a/input.h +++ b/input.h @@ -1,6 +1,14 @@ #ifndef DEF_INPUTH #define DEF_INPUTH +/* simple macro to check a result against an expected value */ +#define CHECK(actual, expected) {\ + if(actual == expected)\ + printf("%d ok\n", actual);\ + else\ + printf("%d ko, expected %d\n", actual, expected);\ +} + struct input_int { size_t line_count; int* lines; -- cgit v1.2.3