summaryrefslogtreecommitdiff
path: root/libc/test/UnitTest/LibcTest.cpp
diff options
context:
space:
mode:
authorGuillaume Chatelet <gchatelet@google.com>2023-08-08 20:52:50 +0000
committerGuillaume Chatelet <gchatelet@google.com>2023-08-08 20:52:50 +0000
commit98ab87f44da09e431b27558de4b3b81622f95118 (patch)
tree3b6d8aaa073c04369df789c627a137463c9cbb9c /libc/test/UnitTest/LibcTest.cpp
parent706914481940a4b114fb02e480f7c2b8e7865c02 (diff)
Revert "[libc] Better IntegerToString API"
This reverts commit 910cc05aae85a6b31e2a2ed87d3dd46db46fce04.
Diffstat (limited to 'libc/test/UnitTest/LibcTest.cpp')
-rw-r--r--libc/test/UnitTest/LibcTest.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/libc/test/UnitTest/LibcTest.cpp b/libc/test/UnitTest/LibcTest.cpp
index d9a9e50ca9a6..3ffd0c3d18ab 100644
--- a/libc/test/UnitTest/LibcTest.cpp
+++ b/libc/test/UnitTest/LibcTest.cpp
@@ -47,8 +47,9 @@ cpp::enable_if_t<cpp::is_integral_v<T> && (sizeof(T) > sizeof(uint64_t)),
cpp::string>
describeValue(T Value) {
static_assert(sizeof(T) % 8 == 0, "Unsupported size of UInt");
- const IntegerToString<T, radix::Hex::WithPrefix> buffer(Value);
- return buffer.view();
+ char buf[IntegerToString::hex_bufsize<T>()];
+ IntegerToString::hex(Value, buf, false);
+ return "0x" + cpp::string(buf, sizeof(buf));
}
// When the value is of a standard integral type, just display it as normal.