Skip to content

Commit

Permalink
[interpreter] rename AssertUncaughtException -> AssertException
Browse files Browse the repository at this point in the history
  • Loading branch information
takikawa committed Jul 15, 2021
1 parent a1eb03b commit e5ceed4
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion interpreter/script/js.ml
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ let of_assertion mods ass =
of_assertion' mods act "assert_trap" [] None
| AssertExhaustion (act, _) ->
of_assertion' mods act "assert_exhaustion" [] None
| AssertUncaughtException act ->
| AssertException act ->
of_assertion' mods act "assert_exception" [] None

let of_command mods cmd =
Expand Down
2 changes: 1 addition & 1 deletion interpreter/script/run.ml
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ let run_assertion ass =
| _ -> Assert.error ass.at "expected runtime error"
)

| AssertUncaughtException act ->
| AssertException act ->
trace ("Asserting exception...");
(match run_action act with
| exception Eval.Exception (_, msg) -> ()
Expand Down
2 changes: 1 addition & 1 deletion interpreter/script/script.ml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ and assertion' =
| AssertUninstantiable of definition * string
| AssertReturn of action * result list
| AssertTrap of action * string
| AssertUncaughtException of action
| AssertException of action
| AssertExhaustion of action * string

type command = command' Source.phrase
Expand Down
2 changes: 1 addition & 1 deletion interpreter/text/arrange.ml
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@ let assertion mode ass =
[Node ("assert_return", action mode act :: List.map (result mode) results)]
| AssertTrap (act, re) ->
[Node ("assert_trap", [action mode act; Atom (string re)])]
| AssertUncaughtException act ->
| AssertException act ->
[Node ("assert_exception", [action mode act])]
| AssertExhaustion (act, re) ->
[Node ("assert_exhaustion", [action mode act; Atom (string re)])]
Expand Down
2 changes: 1 addition & 1 deletion interpreter/text/parser.mly
Original file line number Diff line number Diff line change
Expand Up @@ -1169,7 +1169,7 @@ assertion :
| LPAR ASSERT_RETURN action result_list RPAR { AssertReturn ($3, $4) @@ at () }
| LPAR ASSERT_TRAP action STRING RPAR { AssertTrap ($3, $4) @@ at () }
| LPAR ASSERT_EXCEPTION action RPAR
{ AssertUncaughtException $3 @@ at () }
{ AssertException $3 @@ at () }
| LPAR ASSERT_EXHAUSTION action STRING RPAR { AssertExhaustion ($3, $4) @@ at () }

cmd :
Expand Down

0 comments on commit e5ceed4

Please sign in to comment.