PostGIS 3.7.0dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ assert_string_equal_impl()

static void assert_string_equal_impl ( const char *  obtained,
const char *  expected,
const char *  file,
int  line 
)
inlinestatic

Definition at line 77 of file liblwgeom/cunit/cu_tester.h.

78{
79 CU_BOOL error = (!obtained && expected) || (obtained && !expected) || (strcmp(obtained, expected) != 0);
80 char *msg = NULL;
81 if (error)
82 {
83 msg = lwalloc(60 + (obtained ? strlen(obtained) : 4) + (expected ? strlen(expected) : 4));
84 sprintf(msg,
85 "ASSERT_STRING_EQUAL\n\t* Expected: %s\n\t* Obtained: %s",
86 expected ? expected : "NULL",
87 obtained ? obtained : "NULL");
88 }
89 CU_assertImplementation(!error, line, msg, file, NULL, CU_FALSE);
90 if (msg)
91 lwfree(msg);
92}
void * lwalloc(size_t size)
Definition lwutil.c:227
void lwfree(void *mem)
Definition lwutil.c:248

References lwalloc(), and lwfree().

Here is the call graph for this function: