test: Bring corestring test count up to date

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
This commit is contained in:
Daniel Silverstone 2020-02-21 16:19:35 +00:00
parent 61fdb8fda6
commit 310247ef82
No known key found for this signature in database
GPG Key ID: C30DF439F2987D74

View File

@ -40,7 +40,7 @@
* *
* This is used to test all the out of memory paths in initialisation. * 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) START_TEST(corestrings_test)
{ {
@ -53,8 +53,12 @@ START_TEST(corestrings_test)
res = corestrings_fini(); res = corestrings_fini();
malloc_limit(UINT_MAX); 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); ck_assert_int_eq(res, NSERROR_OK);
} }
END_TEST END_TEST
@ -65,7 +69,7 @@ static TCase *corestrings_case_create(void)
TCase *tc; TCase *tc;
tc = tcase_create("corestrings"); 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; return tc;
} }