From 5a521e7bfca4f62ec32b378c893887f8168f9fc2 Mon Sep 17 00:00:00 2001 From: Sven van Heugten Date: Tue, 12 May 2026 08:45:31 +0200 Subject: [PATCH] Actually check if the mutant was killed --- Mutannot/Program.fs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Mutannot/Program.fs b/Mutannot/Program.fs index 13666be..41dcf33 100644 --- a/Mutannot/Program.fs +++ b/Mutannot/Program.fs @@ -55,7 +55,7 @@ let runTest projectPath testName = Output(new StreamWriter(Console.OpenStandardOutput())) } |> Command.execute - |> ignore + |> Output.toExitCode let getAssemblyPath projectPath = cli { @@ -133,7 +133,13 @@ let main argv = for mutationCase in getMutationCases projectPath do printfn "MUTATION\n\n%s" <| 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 () 0