Skip to content

Commit

Permalink
minor: polish test driver (#476)
Browse files Browse the repository at this point in the history
  • Loading branch information
Young-Flash authored Nov 18, 2024
1 parent 67c2b06 commit 2526d1f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,14 @@ pub fn moonbit_test_driver_internal_execute(filename: MoonbitTestDriverInternalE
} else {
name
}
test_name = name
try {
func!()
} catch {
Failure(e) | InspectError(e) | SnapshotError(e) => {
test_name = name
message = e
}
e => {
test_name = name
message = moonbit_test_driver_internal_error_to_string(e)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ pub fn moonbit_test_driver_internal_execute(file_name: MoonbitTestDriverInternal
} else {
name
}
test_name = name
try {
let func = match item.f {
Moonbit_Test_Driver_Internal__F::F0(f) => f
Expand All @@ -122,11 +123,9 @@ pub fn moonbit_test_driver_internal_execute(file_name: MoonbitTestDriverInternal
func!()
} catch {
Failure(e) | InspectError(e) | SnapshotError(e) => {
test_name = name
message = e
}
e => {
test_name = name
message = moonbit_test_driver_internal_error_to_string(e)
}
}
Expand Down

0 comments on commit 2526d1f

Please sign in to comment.