From: Ivan Maidanski Date: Thu, 19 Jan 2012 04:39:14 +0000 (+0400) Subject: cordtest: Add a test for CORD_cat X-Git-Tag: gc7_3alpha2~208 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=40bd51e9dabb9319e3bef48a29db7481177944d2;p=gc cordtest: Add a test for CORD_cat * cord/tests/cordtest.c (test_basics): Insert a check of CORD_cat result to be not CORD_EMPTY (in case of a non-empty input). --- diff --git a/cord/tests/cordtest.c b/cord/tests/cordtest.c index 3b7082b3..24f56f1a 100644 --- a/cord/tests/cordtest.c +++ b/cord/tests/cordtest.c @@ -58,6 +58,7 @@ void test_basics(void) CORD_pos p; x = CORD_cat(x,x); + if (x == CORD_EMPTY) ABORT("CORD_cat(x,x) returned empty cord"); if (!CORD_IS_STRING(x)) ABORT("short cord should usually be a string"); if (strcmp(x, "abab") != 0) ABORT("bad CORD_cat result");