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

Function TestI64toa

tests/itoa_test.cpp:38–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36}
37
38void TestI64toa(const std::string& expect, int64_t val) {
39 // reserved buffer should be 32 bytes
40 char buf[32] = {0};
41 char* out = I64toa(buf, val);
42 *out = '\0';
43 EXPECT_STREQ(expect.data(), buf);
44 EXPECT_EQ(out - buf, expect.size());
45}
46
47TEST(U64toa, Basic) {
48 TestU64toa("0", 0);

Callers 1

TESTFunction · 0.85

Calls 1

I64toaFunction · 0.85

Tested by

no test coverage detected