This is an archive of the discontinued LLVM Phabricator instance.

[libc] Add testing macros for errno and floating point exceptions.
ClosedPublic

Authored by lntue on Mar 8 2022, 10:38 AM.

Details

Summary

Add testing macros for errno and floating point exceptions.

Diff Detail

Event Timeline

lntue created this revision.Mar 8 2022, 10:38 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptMar 8 2022, 10:38 AM
lntue requested review of this revision.Mar 8 2022, 10:38 AM
michaelrj added inline comments.Mar 8 2022, 10:53 AM
libc/utils/UnitTest/FPMatcher.h
104

why is the do/while(0) necessary?

sivachandra accepted this revision.Mar 8 2022, 11:37 AM

Thanks for doing this. Please answer or fix per @michaelrj's comment.

This revision is now accepted and ready to land.Mar 8 2022, 11:37 AM
lntue added inline comments.Mar 8 2022, 11:41 AM
libc/utils/UnitTest/FPMatcher.h
104

just to safely wrap the if statement and allow it to be used with ; at the end like EXPECT_MATH_ERRNO(value);