Actually check if the mutant was killed

This commit is contained in:
Sven van Heugten 2026-05-12 08:45:31 +02:00
parent 627e7f76a5
commit 5a521e7bfc
No known key found for this signature in database
GPG key ID: D612F88666F4F660

View file

@ -55,7 +55,7 @@ let runTest projectPath testName =
Output(new StreamWriter(Console.OpenStandardOutput())) Output(new StreamWriter(Console.OpenStandardOutput()))
} }
|> Command.execute |> Command.execute
|> ignore |> Output.toExitCode
let getAssemblyPath projectPath = let getAssemblyPath projectPath =
cli { cli {
@ -133,7 +133,13 @@ let main argv =
for mutationCase in getMutationCases projectPath do for mutationCase in getMutationCases projectPath do
printfn "MUTATION\n\n%s" <| mutationCase.Patch printfn "MUTATION\n\n%s" <| mutationCase.Patch
applyPatch mutationCase.Patch applyPatch mutationCase.Patch
runTest projectPath mutationCase.TestName
match runTest projectPath mutationCase.TestName with
| 0 ->
eprintfn "Expected tested to fail, but it succeeded"
exit 3
| _ -> printfn "Mutant killed\n"
restore () restore ()
0 0