Skip to content

Commit

Permalink
improve error message in test-deduce
Browse files Browse the repository at this point in the history
  • Loading branch information
jsiek committed Nov 17, 2024
1 parent 0bb2ab6 commit ec27f5d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion test-deduce.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ def test_deduce(parsers, deduce_call, path, expected_return = 0, extra_arguments
print('Testing:', call)
return_code = os.system(call) // 256 # Why does it multiply the return code by 256???
if return_code != expected_return:
print(call, 'expected return code', expected_return, 'but got', return_code)
if expected_return == 0:
print('\nTest failed!')
else:
print('\nDeduce failed to catch an error!')
exit(1)

def generate_deduce_errors(deduce_call, path):
Expand Down
2 changes: 1 addition & 1 deletion test/should-pass/all2.pf
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ proof
arbitrary p : bool
suppose P: p
P
end
end

0 comments on commit ec27f5d

Please sign in to comment.