summaryrefslogtreecommitdiff
path: root/input.h
diff options
context:
space:
mode:
authorVincent Douillet <vincent@vdouillet.fr>2021-12-05 21:28:14 +0100
committerVincent Douillet <vincent@vdouillet.fr>2021-12-05 22:40:02 +0100
commit4c42453d856053bb49affef7c165397e5c16d9eb (patch)
tree75c9cbd2aea8a39841de37ae636408b7dd428326 /input.h
parent8dafc5f3d72d9670dea971174d66a5ae006900b7 (diff)
day 5
Diffstat (limited to 'input.h')
-rw-r--r--input.h8
1 files changed, 8 insertions, 0 deletions
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;