feat: replace validateIndexOld with validateIndex and add validateString for core methods
Remove the deprecated validateIndexOld function and migrate all callers to the new validateIndex that reports runtime errors. Add validateString helper for string argument checking. Introduce comprehensive runtime error tests for list and string subscript operations, removeAt, and contains methods, replacing old silent null returns with proper error halting.
This commit is contained in:
@@ -195,8 +195,8 @@ def run_test(path):
|
||||
for line in expect_error:
|
||||
fails.append('Expected error on line ' + str(line) + ' and got none.')
|
||||
if expect_runtime_error:
|
||||
fails.append('Expected runtime error ' + expect_runtime_error +
|
||||
' and got none.')
|
||||
fails.append('Expected runtime error "' + expect_runtime_error +
|
||||
'" and got none.')
|
||||
|
||||
# Validate the exit code.
|
||||
if proc.returncode != expect_return:
|
||||
|
||||
Reference in New Issue
Block a user