fix UT to match current sllv_append semantics

This commit is contained in:
John Kerl 2015-10-01 23:08:40 -04:00
parent 35714241ba
commit 3d280fe431
2 changed files with 3 additions and 7 deletions

View file

@ -1,7 +1,7 @@
================================================================
BUGFIXES
!! failure in test_multiple_containers in travis but ok on localbox even with fresh checkout -- needs debugging !!
:D
================================================================
TOP OF LIST

View file

@ -81,10 +81,11 @@ static char* test_sllv() {
mu_assert_lf(pe != NULL); mu_assert_lf(streq(pe->pvdata, "e")); pe = pe->pnext;
mu_assert_lf(pe == NULL);
// sllv_append frees the control structure for its second argument so do no
// assertions there
pa = sllv_append(pa, pb);
mu_assert_lf(pa->length == 5);
mu_assert_lf(pb->length == 2);
pe = pa->phead;
mu_assert_lf(pe != NULL); mu_assert_lf(streq(pe->pvdata, "a")); pe = pe->pnext;
@ -94,11 +95,6 @@ static char* test_sllv() {
mu_assert_lf(pe != NULL); mu_assert_lf(streq(pe->pvdata, "e")); pe = pe->pnext;
mu_assert_lf(pe == NULL);
pe = pb->phead;
mu_assert_lf(pe != NULL); mu_assert_lf(streq(pe->pvdata, "d")); pe = pe->pnext;
mu_assert_lf(pe != NULL); mu_assert_lf(streq(pe->pvdata, "e")); pe = pe->pnext;
mu_assert_lf(pe == NULL);
return NULL;
}