From f4c03837b579b78c080a73ae53aa1e06223cdf55 Mon Sep 17 00:00:00 2001 From: Voidbert Date: Wed, 7 May 2025 18:51:26 +0100 Subject: [PATCH] Add PIT for mutation testing --- build.gradle.kts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/build.gradle.kts b/build.gradle.kts index 15ccad5..e8988d2 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -19,6 +19,7 @@ plugins { application jacoco + id("info.solidsoft.pitest") version "1.15.0" } repositories { @@ -70,3 +71,16 @@ tasks.register("format") { workingDir = file(rootDir) commandLine = listOf("sh", "-c", "find src -type f | xargs -n1 sh -c 'clang-format -i $0; sed -i s/\\\\r//g $0'") } + +// PIT Mutation Testing +pitest { + junit5PluginVersion.set("1.2.2") + pitestVersion.set("1.19.1") + + targetClasses.set(setOf("MakeItFit.*")) + testSourceSets.set(listOf(sourceSets.test.get())) + mainSourceSets.set(listOf(sourceSets.main.get())) + + outputFormats.set(setOf("HTML")) + timestampedReports.set(false) +}