From 310247ef82a99512d7f3302b149a1bae0736b34f Mon Sep 17 00:00:00 2001 From: Daniel Silverstone Date: Fri, 21 Feb 2020 16:19:35 +0000 Subject: [PATCH] test: Bring corestring test count up to date Signed-off-by: Daniel Silverstone --- test/corestrings.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/test/corestrings.c b/test/corestrings.c index 02640c953..8690d82aa 100644 --- a/test/corestrings.c +++ b/test/corestrings.c @@ -40,7 +40,7 @@ * * This is used to test all the out of memory paths in initialisation. */ -#define CORESTRING_TEST_COUNT 435 +#define CORESTRING_TEST_COUNT 480 START_TEST(corestrings_test) { @@ -53,8 +53,12 @@ START_TEST(corestrings_test) res = corestrings_fini(); malloc_limit(UINT_MAX); - - ck_assert_int_eq(ires, NSERROR_NOMEM); + + if (_i < CORESTRING_TEST_COUNT) { + ck_assert_int_eq(ires, NSERROR_NOMEM); + } else { + ck_assert_int_eq(ires, NSERROR_OK); + } ck_assert_int_eq(res, NSERROR_OK); } END_TEST @@ -65,7 +69,7 @@ static TCase *corestrings_case_create(void) TCase *tc; tc = tcase_create("corestrings"); - tcase_add_loop_test(tc, corestrings_test, 0, CORESTRING_TEST_COUNT); + tcase_add_loop_test(tc, corestrings_test, 0, CORESTRING_TEST_COUNT + 1); return tc; }