[libc-commits] [PATCH] D152607: [libc][math] Move str method from FPBits class to testing utils.

Siva Chandra via Phabricator via libc-commits libc-commits at lists.llvm.org
Fri Jun 9 22:26:44 PDT 2023


sivachandra added a comment.

LGTM but a comment about putting the new function in a different place.



================
Comment at: libc/test/UnitTest/StringUtils.h:22
 cpp::enable_if_t<cpp::is_integral_v<T>, cpp::string>
 int_to_hex(T value, size_t length = sizeof(T) * 2) {
   cpp::string s(length, '0');
----------------
I am planning to get rid of this also as it is duplicated functionality without tests. Also, adding code here but test in `test/src/__support` breaks our structuring. Can you move the new `str` function to say `src/__support/FPUtil/fpbits_str.h` ?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D152607/new/

https://reviews.llvm.org/D152607



More information about the libc-commits mailing list