Skip to content

Commit f6b719b

Browse files
committed
add/rename tests
1 parent 1d0d3f4 commit f6b719b

2 files changed

Lines changed: 11 additions & 1 deletion

File tree

‎test/cli/other_test.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2928,7 +2928,7 @@ def test_outputfile(tmp_path): # #14051
29282928
assert out_text.splitlines() == out_exp
29292929

29302930

2931-
def test_internal_error_loc_int(tmp_path):
2931+
def test_syntax_error_loc_int(tmp_path):
29322932
test_file = tmp_path / 'test.c'
29332933
with open(test_file, 'wt') as f:
29342934
f.write(

‎test/testmathlib.cpp‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -589,6 +589,16 @@ class TestMathLib : public TestFixture {
589589
tok->str("invalid");
590590
ASSERT_THROW_INTERNAL_EQUALS(MathLib::toBigUNumber(tok), INTERNAL, "Internal Error. MathLib::toBigUNumber: invalid_argument: invalid");
591591
ASSERT_THROW_INTERNAL_EQUALS(MathLib::toBigUNumber("invalid", tok), INTERNAL, "Internal Error. MathLib::toBigUNumber: invalid_argument: invalid");
592+
593+
// the error location is the token (#13488)
594+
tok->str("0x10000000000000000");
595+
try {
596+
(void)MathLib::toBigUNumber(tok);
597+
assertThrowFail(__FILE__, __LINE__);
598+
} catch (const InternalError &e) {
599+
ASSERT_EQUALS("Internal Error. MathLib::toBigUNumber: out_of_range: 0x10000000000000000", e.errorMessage);
600+
ASSERT(e.token == tok);
601+
}
592602
TokenList::deleteTokens(tok);
593603
}
594604

0 commit comments

Comments
 (0)