Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F161448905
D28788.id84521.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D28788.id84521.diff
View Options
diff --git a/lib/msun/tests/ctrig_test.c b/lib/msun/tests/ctrig_test.c
--- a/lib/msun/tests/ctrig_test.c
+++ b/lib/msun/tests/ctrig_test.c
@@ -58,14 +58,22 @@
* XXX The volatile here is to avoid gcc's bogus constant folding and work
* around the lack of support for the FENV_ACCESS pragma.
*/
-#define test_p(func, z, result, exceptmask, excepts, checksign) do { \
- volatile long double complex _d = z; \
- debug(" testing %s(%Lg + %Lg I) == %Lg + %Lg I\n", #func, \
- creall(_d), cimagl(_d), creall(result), cimagl(result)); \
- ATF_CHECK(feclearexcept(FE_ALL_EXCEPT) == 0); \
- ATF_CHECK(cfpequal_cs((func)(_d), (result), (checksign))); \
- ATF_CHECK(((void)(func), fetestexcept(exceptmask) == (excepts))); \
-} while (0)
+#define test_p(func, z, result, exceptmask, excepts, checksign) \
+ do { \
+ volatile long double complex _d = z; \
+ debug(" testing %s(%Lg + %Lg I) == %Lg + %Lg I\n", #func, \
+ creall(_d), cimagl(_d), creall(result), cimagl(result)); \
+ ATF_CHECK(feclearexcept(FE_ALL_EXCEPT) == 0); \
+ volatile long double complex _r = (func)(_d); \
+ ATF_CHECK_MSG(cfpequal_cs(_r, (result), (checksign)), \
+ "%s (%Lg + %Lg I) != expected (%Lg + %Lg I)", \
+ __XSTRING((func)(_d)), creall(_r), cimagl(_r), \
+ creall(result), cimagl(result)); \
+ volatile int _e = fetestexcept(exceptmask); \
+ ATF_CHECK_MSG(_e == (excepts), \
+ "%s fetestexcept(%s) (%#x) != %#x", __XSTRING(func), \
+ __XSTRING(exceptmask), _e, (excepts)); \
+ } while (0)
/*
* Test within a given tolerance. The tolerance indicates relative error
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Jul 4, 9:39 PM (12 h, 57 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34638520
Default Alt Text
D28788.id84521.diff (1 KB)
Attached To
Mode
D28788: lib/msun/ctrig_test: Print the mismatched values on failure
Attached
Detach File
Event Timeline
Log In to Comment