Skip to content

Commit

Permalink
fixed bug in test (traps)
Browse files Browse the repository at this point in the history
  • Loading branch information
ilagunap committed Sep 3, 2021
1 parent 9a746bc commit 6be76b1
Showing 1 changed file with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,21 +42,19 @@ def test_1():
cmd = ["FPC_TRAP_CANCELLATION=1 FPC_TRAP_LINE=14 ./main"]
assert run_command(cmd) == 0

SIGABRT_ID = 128 + 6

### Failure Cases ###
cmd = ["FPC_TRAP_NAN=1 ./main"]
assert run_command(cmd) == SIGABRT_ID
assert run_command(cmd) != 0

cmd = ["FPC_TRAP_INFINITY_POS=1 ./main"]
assert run_command(cmd) == SIGABRT_ID
assert run_command(cmd) != 0

cmd = ["FPC_TRAP_FILE=compute.cpp FPC_TRAP_NAN=1 ./main"]
assert run_command(cmd) == SIGABRT_ID
assert run_command(cmd) != 0

cmd = ["FPC_TRAP_FILE=compute.cpp FPC_TRAP_INFINITY_POS=1 ./main"]
assert run_command(cmd) == SIGABRT_ID
assert run_command(cmd) != 0

cmd = ["FPC_TRAP_CANCELLATION=1 FPC_TRAP_LINE=15 ./main"]
assert run_command(cmd) == SIGABRT_ID
assert run_command(cmd) != 0

0 comments on commit 6be76b1

Please sign in to comment.