Skip to content

Commit

Permalink
Fail RunAndQuit if no tests are found
Browse files Browse the repository at this point in the history
The RunAndQuit method is intended to run automated tests; if no tests are found, this is likely a test setup error.
  • Loading branch information
gertjanklein committed Jun 16, 2022
1 parent a9562b3 commit f27111f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Strix.Testing.Runner.cls
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,10 @@ ClassMethod RunAndQuit(TestSpec As %String = "", Save As %Boolean = 0)
{
Set $ZTrap = "Error"

#dim Runner As Strix.Testing.Runner
Set Runner = ..Run(TestSpec, 0, Save)

If Runner.Failed+Runner.Errors {
If (Runner.Failed+Runner.Errors) || 'Runner.Asserts {
; This returns exit status 1
Do $System.Process.Terminate()
}
Expand Down

0 comments on commit f27111f

Please sign in to comment.