From 6b97a7436df70fd6337c3c2c260c656ede2320ac Mon Sep 17 00:00:00 2001 From: Patrick Pelissier Date: Sat, 2 May 2020 10:06:30 +0200 Subject: [PATCH] Add basic tests for dispathing init_with based on their number of args --- tests/test-mcore.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/test-mcore.c b/tests/test-mcore.c index 57035152..eccd412a 100644 --- a/tests/test-mcore.c +++ b/tests/test-mcore.c @@ -295,6 +295,12 @@ static void test_oplist(void) #define A5 (NAME(1)) assert (M_GET_NAME A5); + +#define A6 (NAME(A6), INIT_WITH(API_1(M_INIT_WITH_NVAR))) +#define A6_init_with_1(x) 1 +#define A6_init_with_2(x, y) 0 + assert (M_CALL_INIT_WITH (A6, 0)); + assert (!M_CALL_INIT_WITH (A6, 0, 0)); } static void test_cast(void)