Skip to content

Commit

Permalink
Check for exit code in compiler tests (#7211)
Browse files Browse the repository at this point in the history
  • Loading branch information
forki authored and KevinRansom committed Jul 14, 2019
1 parent c79a8ab commit ec8a424
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/fsharp/Compiler/CompilerAssert.fs
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,9 @@ module CompilerAssert =
let errors = p.StandardError.ReadToEnd ()
if not (String.IsNullOrWhiteSpace errors) then
Assert.Fail errors

if p.ExitCode <> 0 then
Assert.Fail(sprintf "Program exited with exit code %d" p.ExitCode)
)

let CompileLibraryAndVerifyIL (source: string) (f: ILVerifier -> unit) =
Expand Down

0 comments on commit ec8a424

Please sign in to comment.