github.com/goshafaq/sonic@v0.0.0-20231026082336-871835fb94c6/native/unittest/test_fastfint.c (about) 1 #include "native.c" 2 #include <assert.h> 3 #include <string.h> 4 5 void test_u64toa(uint64_t input, const char* expect) { 6 char buf[64] = {0}; 7 u64toa(buf, input); 8 assert(strcmp(expect, buf) == 0); 9 } 10 11 int main() { 12 test_u64toa(0, "0"); 13 test_u64toa(1, "1"); 14 test_u64toa(1345, "1345"); 15 // test max uint64 16 test_u64toa(18446744073709551615ULL, "18446744073709551615"); 17 }