Fix #1521 - add mg_tou64()

This commit is contained in:
Sergey Lyubka committed 2022-04-12 10:20:43 +01:00
1 parent db941e2627
commit 66376885e9
6 files changed
+34

No files matched your search

+5
View File
@@ -1499,6 +1499,11 @@ static void test_util(void) {
ASSERT(mg_to64(mg_str("-9223372036854775809")) == 0);
ASSERT(mg_to64(mg_str("9223372036854775800")) == 0);
ASSERT(mg_to64(mg_str("9223372036854775700")) > 0);
ASSERT(mg_tou64(mg_str("0")) == 0);
ASSERT(mg_tou64(mg_str("123")) == 123);
ASSERT(mg_tou64(mg_str("")) == 0);
ASSERT(mg_tou64(mg_str("-")) == 0);
ASSERT(mg_tou64(mg_str("18446744073709551615")) == 18446744073709551615U);
}
static void test_crc32(void) {