From 70fa62174536e034e8e84a6ea49aa52eb1d4b31c Mon Sep 17 00:00:00 2001 From: Patrick Pelissier Date: Sat, 2 Oct 2021 13:09:51 +0200 Subject: [PATCH] Add test function for _splice function --- tests/test-mdict.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/test-mdict.c b/tests/test-mdict.c index d442de57..5e30c7d7 100644 --- a/tests/test-mdict.c +++ b/tests/test-mdict.c @@ -430,6 +430,11 @@ static void test_init_oa(void) //assert (dict_oa_int_hash (d2) != 0); } + M_LET( (d1, (1, 2), (2, 3), (4, 5)), (d2, (1, 3), (4, 7), (10, 14)), (r1, (1, 5), (2, 3), (4, 12), (10, 14) ), DICT_OPLIST(dict_oa_int, M_DEFAULT_OPLIST, M_DEFAULT_OPLIST)) { + dict_oa_int_splice(d1, d2); + assert(dict_oa_int_equal_p(d1, r1)); + assert(dict_oa_int_empty_p(d2)); + } } static void test_it_oa(void)