{ "Simple Tests", "test_ck_assert_float_infinite_with_mod", CK_FAILURE, CK_MSG_TEXT, "Assertion '2%d is infinite' failed: 2%d == 0" },
{ "Simple Tests", "test_ck_assert_float_nan", CK_FAILURE, CK_MSG_TEXT, "Assertion 'x is NaN' failed: x == inf" },
{ "Simple Tests", "test_ck_assert_float_nan_with_mod", CK_FAILURE, CK_MSG_TEXT, "Assertion '2%d is NaN' failed: 2%d == 0" },
+#if ENABLE_REGEX
+ { "Simple Tests", "test_ck_assert_float_nonnan", CK_FAILURE, CK_MSG_REGEXP, "^Assertion 'x is not NaN' failed: x == -?nan$" },
+ { "Simple Tests", "test_ck_assert_float_nonnan_with_mod", CK_FAILURE, CK_MSG_REGEXP, "^Assertion '\\(2%s\\)\\*x is not NaN' failed: \\(2%s\\)\\*x == -?nan$" },
+#else
{ "Simple Tests", "test_ck_assert_float_nonnan", CK_PASS, CK_MSG_TEXT, "Passed" },
{ "Simple Tests", "test_ck_assert_float_nonnan_with_mod", CK_PASS, CK_MSG_TEXT, "Passed" },
+#endif
{ "Simple Tests", "test_ck_assert_float_nan_and_inf_with_expr", CK_PASS, CK_MSG_TEXT, "Passed" },
/* End of tests on float macros */
/* Tests on double macros */
{ "Simple Tests", "test_ck_assert_double_infinite_with_mod", CK_FAILURE, CK_MSG_TEXT, "Assertion '2%d is infinite' failed: 2%d == 0" },
{ "Simple Tests", "test_ck_assert_double_nan", CK_FAILURE, CK_MSG_TEXT, "Assertion 'x is NaN' failed: x == inf" },
{ "Simple Tests", "test_ck_assert_double_nan_with_mod", CK_FAILURE, CK_MSG_TEXT, "Assertion '2%d is NaN' failed: 2%d == 0" },
+#if ENABLE_REGEX
+ { "Simple Tests", "test_ck_assert_double_nonnan", CK_FAILURE, CK_MSG_REGEXP, "^Assertion 'x is not NaN' failed: x == -?nan$" },
+ { "Simple Tests", "test_ck_assert_double_nonnan_with_mod", CK_FAILURE, CK_MSG_REGEXP, "^Assertion '\\(2%s\\)\\*x is not NaN' failed: \\(2%s\\)\\*x == -?nan$" },
+#else
{ "Simple Tests", "test_ck_assert_double_nonnan", CK_PASS, CK_MSG_TEXT, "Passed" },
{ "Simple Tests", "test_ck_assert_double_nonnan_with_mod", CK_PASS, CK_MSG_TEXT, "Passed" },
+#endif
{ "Simple Tests", "test_ck_assert_double_nan_and_inf_with_expr", CK_PASS, CK_MSG_TEXT, "Passed" },
/* End of tests on double macros */
/* Tests on long double macros */
{ "Simple Tests", "test_ck_assert_ldouble_infinite_with_mod", CK_FAILURE, CK_MSG_TEXT, "Assertion '2%d is infinite' failed: 2%d == 0" },
{ "Simple Tests", "test_ck_assert_ldouble_nan", CK_FAILURE, CK_MSG_TEXT, "Assertion 'x is NaN' failed: x == inf" },
{ "Simple Tests", "test_ck_assert_ldouble_nan_with_mod", CK_FAILURE, CK_MSG_TEXT, "Assertion '2%d is NaN' failed: 2%d == 0" },
+#if ENABLE_REGEX
+ { "Simple Tests", "test_ck_assert_ldouble_nonnan", CK_FAILURE, CK_MSG_REGEXP, "^Assertion 'x is not NaN' failed: x == -?nan$" },
+ { "Simple Tests", "test_ck_assert_ldouble_nonnan_with_mod", CK_FAILURE, CK_MSG_REGEXP, "^Assertion '\\(2%s\\)\\*x is not NaN' failed: \\(2%s\\)\\*x == -?nan$" },
+#else
{ "Simple Tests", "test_ck_assert_ldouble_nonnan", CK_PASS, CK_MSG_TEXT, "Passed" },
{ "Simple Tests", "test_ck_assert_ldouble_nonnan_with_mod", CK_PASS, CK_MSG_TEXT, "Passed" },
+#endif
{ "Simple Tests", "test_ck_assert_ldouble_nan_and_inf_with_expr", CK_PASS, CK_MSG_TEXT, "Passed" },
/* End of tests on long double macros */
{ "Simple Tests", "test_percent_n_escaped", CK_FAILURE, CK_MSG_TEXT, "Assertion 'returnsZero(\"%n\") == 1' failed: returnsZero(\"%n\") == 0, 1 == 1" },
{
record_test_name(tcase_name());
- float t = 1.0f;
float x = 0.0f;
ck_assert_float_nonnan(x);
- // TODO: test with 0.0/0.0 and platform specific output.
+#if ENABLE_REGEX
+ float t = 1.0f;
+ x = 0.0f / (1.0f - t);
+ record_failure_line_num(__LINE__);
+ ck_assert_float_nonnan(x);
+#endif
}
END_TEST
int s = 2;
ck_assert_float_nonnan(2%s);
- // TODO: test with 0.0/0.0 and platform specific output.
+#if ENABLE_REGEX
+ float t = 1.0f;
+ float x = 0.0f / (1.0f - t);
+ record_failure_line_num(__LINE__);
+ ck_assert_float_nonnan((2%s)*x);
+#endif
}
END_TEST
{
record_test_name(tcase_name());
- double t = 1;
double x = 0;
ck_assert_double_nonnan(x);
- // TODO: test with 0.0/0.0 and platform specific output.
+#if ENABLE_REGEX
+ double t = 1;
+ x = 0.0 / (1.0 - t);
+ record_failure_line_num(__LINE__);
+ ck_assert_double_nonnan(x);
+#endif
}
END_TEST
int s = 2;
ck_assert_double_nonnan(2%s);
- // TODO: test with 0.0/0.0 and platform specific output.
+#if ENABLE_REGEX
+ double t = 1.0;
+ double x = 0.0 / (1.0 - t);
+ record_failure_line_num(__LINE__);
+ ck_assert_double_nonnan((2%s)*x);
+#endif
}
END_TEST
{
record_test_name(tcase_name());
- long double t = 1.0l;
long double x = 0.0l;
ck_assert_ldouble_nonnan(x);
- // TODO: test with 0.0/0.0 and platform specific output.
+#if ENABLE_REGEX
+ long double t = 1.0l;
+ x = 0.0l / (1.0l - t);
+ record_failure_line_num(__LINE__);
+ ck_assert_ldouble_nonnan(x);
+#endif
}
END_TEST
int s = 2;
ck_assert_ldouble_nonnan(2%s);
- // TODO: test with 0.0/0.0 and platform specific output.
+#if ENABLE_REGEX
+ long double t = 1.0l;
+ long double x = 0.0l / (1.0l - t);
+ record_failure_line_num(__LINE__);
+ ck_assert_ldouble_nonnan((2%s)*x);
+#endif
}
END_TEST