MCPcopy Create free account
hub / github.com/bytedance/sonic-cpp / TestU64toa

Function TestU64toa

tests/itoa_test.cpp:29–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27using namespace sonic_json::internal;
28
29void TestU64toa(const std::string& expect, uint64_t val) {
30 // reserved buffer should be 32 bytes
31 char buf[32] = {0};
32 char* out = U64toa(buf, val);
33 *out = '\0';
34 EXPECT_STREQ(expect.data(), buf);
35 EXPECT_EQ(out - buf, expect.size());
36}
37
38void TestI64toa(const std::string& expect, int64_t val) {
39 // reserved buffer should be 32 bytes

Callers 1

TESTFunction · 0.85

Calls 1

U64toaFunction · 0.85

Tested by

no test coverage detected