mirror of
https://github.com/godotengine/godot.git
synced 2024-11-22 04:06:14 +00:00
Add test cases for numeric literals with underscores
This commit is contained in:
parent
c5f7a581f7
commit
b2d8c5140e
@ -148,6 +148,20 @@ TEST_CASE("[Expression] Scientific notation") {
|
||||
"The expression should return the expected result.");
|
||||
}
|
||||
|
||||
TEST_CASE("[Expression] Underscored numeric literals") {
|
||||
Expression expression;
|
||||
|
||||
CHECK_MESSAGE(
|
||||
expression.parse("1_000_000") == OK,
|
||||
"The expression should parse successfully.");
|
||||
CHECK_MESSAGE(
|
||||
expression.parse("1_000.000") == OK,
|
||||
"The expression should parse successfully.");
|
||||
CHECK_MESSAGE(
|
||||
expression.parse("0xff_99_00") == OK,
|
||||
"The expression should parse successfully.");
|
||||
}
|
||||
|
||||
TEST_CASE("[Expression] Built-in functions") {
|
||||
Expression expression;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user