1
0
forked from Mirror/wren

Remove magic values as exit codes in test application (#777)

This commit is contained in:
CohenArthur
2020-07-11 22:30:43 +02:00
committed by GitHub
parent a3f5b3d98f
commit 58611240e7
5 changed files with 29 additions and 12 deletions

View File

@ -53,7 +53,6 @@ num_skipped = 0
skipped = defaultdict(int)
expectations = 0
class Test:
def __init__(self, path):
self.path = path
@ -99,7 +98,7 @@ class Test:
if match:
self.compile_errors.add(line_num)
# If we expect a compile error, it should exit with EX_DATAERR.
# If we expect a compile error, it should exit with WREN_EX_DATAERR.
self.exit_code = 65
expectations += 1
@ -107,7 +106,7 @@ class Test:
if match:
self.compile_errors.add(int(match.group(1)))
# If we expect a compile error, it should exit with EX_DATAERR.
# If we expect a compile error, it should exit with WREN_EX_DATAERR.
self.exit_code = 65
expectations += 1
@ -115,7 +114,7 @@ class Test:
if match:
self.runtime_error_line = line_num
self.runtime_error_message = match.group(2)
# If the runtime error isn't handled, it should exit with EX_SOFTWARE.
# If the runtime error isn't handled, it should exit with WREN_EX_SOFTWARE.
if match.group(1) != "handled ":
self.exit_code = 70
expectations += 1