Rewrite tests v2, and remove all the extra state
This commit is contained in:
parent
f6ae4ad2a0
commit
c5bb86cabc
4
dqn.h
4
dqn.h
@ -3720,7 +3720,7 @@ DQN_API Dqn_String Dqn_StringTrimByteOrderMark(Dqn_String src)
|
|||||||
|
|
||||||
DQN_API Dqn_b32 Dqn_StringIsAllDigits(Dqn_String src)
|
DQN_API Dqn_b32 Dqn_StringIsAllDigits(Dqn_String src)
|
||||||
{
|
{
|
||||||
if (!Dqn_StringIsValid(src))
|
if (!Dqn_StringIsValid(src) || src.size == 0)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
for (Dqn_isize ch_index = 0; ch_index < src.size; ch_index++)
|
for (Dqn_isize ch_index = 0; ch_index < src.size; ch_index++)
|
||||||
@ -5453,7 +5453,7 @@ DQN_API Dqn_u64 Dqn_CStringToU64(char const *buf, int size, char separator)
|
|||||||
if (index && ch == separator)
|
if (index && ch == separator)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (ch >= '0' || ch <= '9')
|
if (ch < '0' || ch > '9')
|
||||||
break;
|
break;
|
||||||
|
|
||||||
result = Dqn_SafeMulU64(result, 10);
|
result = Dqn_SafeMulU64(result, 10);
|
||||||
|
1200
dqn_tests.cpp
1200
dqn_tests.cpp
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user