This is an archive of the discontinued LLVM Phabricator instance.

[libc] fix string conversion tests for windows
ClosedPublic

Authored by michaelrj on Aug 23 2021, 3:38 PM.

Details

Summary

There were some copy paste errors as well as some oddities around how
windows handles the difference between long and long long types. This
change fixes those.

Diff Detail

Event Timeline

michaelrj created this revision.Aug 23 2021, 3:38 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 23 2021, 3:38 PM
michaelrj requested review of this revision.Aug 23 2021, 3:38 PM
sivachandra accepted this revision.Aug 23 2021, 4:01 PM
sivachandra added inline comments.
libc/test/src/stdlib/strtol_test.cpp
31–32

I think a more appropriate way to do these comparisons would be:

EXPECT_EQ(str_end - ten, ptrdiff_t(2));
This revision is now accepted and ready to land.Aug 23 2021, 4:01 PM

switch to ptrdiff_t for the tests.

michaelrj marked an inline comment as done.Aug 24 2021, 10:47 AM
This revision was landed with ongoing or failed builds.Aug 24 2021, 11:06 AM
This revision was automatically updated to reflect the committed changes.