Allow for different-cased "nan" value returned by tr_truncd

This commit is contained in:
Mike Gelfand 2016-12-24 20:20:55 +03:00
parent 448d8f39f6
commit 88505c345f
1 changed files with 1 additions and 1 deletions

View File

@ -397,7 +397,7 @@ test_truncd (void)
#if !(defined (_MSC_VER) || (defined (__MINGW32__) && defined (__MSVCRT__)))
/* FIXME: MSCVRT behaves differently in case of nan */
tr_snprintf (buf, sizeof (buf), "%.2f", tr_truncd (nan, 2));
check (strstr (buf, "nan") != NULL);
check (strstr (buf, "nan") != NULL || strstr (buf, "NaN") != NULL);
#else
(void) nan;
#endif