Add native StringToI64 (#2449)

* Add native StringToInt64Ex

* Delete useless test code

* Rename native StringToInt64Ex to StringToI64

* Add documentation for out-of-bounds situations.
This commit is contained in:
F1F88
2026-09-03 21:42:52 -07:00
committed by GitHub
parent e078b2b542
commit bea10f0fb1
4 changed files with 196 additions and 0 deletions
+14
View File
@@ -141,3 +141,17 @@ stock void AssertStrArrayEq(const char[] text, const char[][] value, const char[
}
PrintToServer("[%d] %s: '%s' arrays are equal OK", TestNumber, TestContext, text);
}
stock void AssertInt64Eq(const char[] text, int64 value, int64 expected)
{
TestNumber++;
if (value == expected)
{
PrintToServer("[%d] %s: %s == %ld OK", TestNumber, TestContext, text, expected);
}
else
{
PrintToServer("[%d] %s FAIL: %s should be %ld, got %ld", TestNumber, TestContext, text, expected, value);
ThrowError("test %d (%s in %s) failed", TestNumber, text, TestContext);
}
}