This is an archive of the discontinued LLVM Phabricator instance.

[support] Fix PrintNumber Test on AIX
ClosedPublic

Authored by paulkirth on Mar 23 2023, 10:16 AM.

Details

Summary

When fixing the test earlier, we missed the JSON case for NaN and INF,
so handle those the same as for non-JSON, by creating the string
dynamically.

Diff Detail

Event Timeline

paulkirth created this revision.Mar 23 2023, 10:16 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 23 2023, 10:16 AM
paulkirth requested review of this revision.Mar 23 2023, 10:16 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 23 2023, 10:16 AM
This revision is now accepted and ready to land.Mar 23 2023, 10:26 AM
This revision was landed with ongoing or failed builds.Mar 23 2023, 10:49 AM
This revision was automatically updated to reflect the committed changes.
ro added a subscriber: ro.Mar 24 2023, 6:21 AM

Even with this patch, the ScopedPrinterTest.PrintNumber test still FAILs on Solaris:

/vol/llvm/src/llvm-project/dist/llvm/unittests/Support/ScopedPrinterTest.cpp:91: Failure
Expected equality of these values:
[...]
With diff:
@@ -23,5 +23,5 @@
   \"float-max\": 3.4028234663852886e+38,
   \"float-min\": 1.1754943508222875e-38,
-  \"float-inf\": inf,
+  \"float-inf\": infinity,
   \"float-nan\": nan,
   \"float-42.0\": 42,
@@ -29,5 +29,5 @@
   \"double-max\": 1.7976931348623157e+308,
   \"double-min\": 2.2250738585072014e-308,
-  \"double-inf\": inf,
+  \"double-inf\": infinity,
   \"double-nan\": nan,
   \"double-42.0\": 42,