result = u32_normalize (UNINORM_NFC, input, input_length, preallocated, &length);
if (!(result != NULL))
return 8;
- if (!(result == preallocated))
+ if (!(preallocated == NULL || result == preallocated))
return 9;
if (!(length == expected_length))
return 10;
void
test_u32_nfc (void)
{
+ { /* Empty string. */
+ ASSERT (check (NULL, 0, NULL, 0) == 0);
+ }
{ /* SPACE */
static const uint32_t input[] = { 0x0020 };
ASSERT (check (input, SIZEOF (input), input, SIZEOF (input)) == 0);