diff options
author | Vincent Douillet <vincent@vdouillet.fr> | 2021-12-05 21:28:14 +0100 |
---|---|---|
committer | Vincent Douillet <vincent@vdouillet.fr> | 2021-12-05 22:40:02 +0100 |
commit | 4c42453d856053bb49affef7c165397e5c16d9eb (patch) | |
tree | 75c9cbd2aea8a39841de37ae636408b7dd428326 /input.h | |
parent | 8dafc5f3d72d9670dea971174d66a5ae006900b7 (diff) |
day 5
Diffstat (limited to 'input.h')
-rw-r--r-- | input.h | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -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; |