7a045d31d7
Build & Test (NowChessSystems) TeamCity build finished
Summary - Added fastparse_3:3.0.2 dependency to modules/io - Implemented FenParserFastParse as a second alternative FEN parser using FastParse, with the same public API as FenParser and FenParserCombinators - Parsers are built bottom-up using (using P[Any]) Scala 3 syntax with NoWhitespace.* to prevent implicit whitespace skipping; rank sum validation uses Pass/Fail inside .flatMap - Added FenParserFastParseTest mirroring FenParserCombinatorsTest to prove behavioural equivalence across all three implementations Test plan - All existing tests pass — FenParser, FenParserCombinators, and all other modules untouched - FenParserFastParseTest covers all cases: valid FEN, invalid color, invalid castling, invalid board shapes, en passant, rank overflow, round-trip via FenExporter - All parser logic branches genuinely covered — known scoverage gap documented in docs/unresolved.md (FastParse inline macro generates synthetic proxy methods that scoverage instruments but that never execute at runtime) Co-authored-by: LQ63 <lkhermann@web.de> Reviewed-on: #22 Reviewed-by: Janis <janis-e@gmx.de> Co-authored-by: Leon Hermann <lq@blackhole.local> Co-committed-by: Leon Hermann <lq@blackhole.local>
67 lines
1.6 KiB
Kotlin
67 lines
1.6 KiB
Kotlin
plugins {
|
|
id("scala")
|
|
id("org.scoverage") version "8.1"
|
|
}
|
|
|
|
group = "de.nowchess"
|
|
version = "1.0-SNAPSHOT"
|
|
|
|
@Suppress("UNCHECKED_CAST")
|
|
val versions = rootProject.extra["VERSIONS"] as Map<String, String>
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
|
|
scala {
|
|
scalaVersion = versions["SCALA3"]!!
|
|
}
|
|
|
|
scoverage {
|
|
scoverageVersion.set(versions["SCOVERAGE"]!!)
|
|
}
|
|
|
|
tasks.withType<ScalaCompile> {
|
|
scalaCompileOptions.additionalParameters = listOf("-encoding", "UTF-8")
|
|
}
|
|
|
|
dependencies {
|
|
|
|
implementation("org.scala-lang:scala3-compiler_3") {
|
|
version {
|
|
strictly(versions["SCALA3"]!!)
|
|
}
|
|
}
|
|
implementation("org.scala-lang:scala3-library_3") {
|
|
version {
|
|
strictly(versions["SCALA3"]!!)
|
|
}
|
|
}
|
|
|
|
implementation("org.scala-lang.modules:scala-parser-combinators_3:${versions["SCALA_PARSER_COMBINATORS"]!!}")
|
|
implementation("com.lihaoyi:fastparse_3:${versions["FASTPARSE"]!!}")
|
|
|
|
implementation(project(":modules:api"))
|
|
implementation(project(":modules:rule"))
|
|
|
|
testImplementation(platform("org.junit:junit-bom:5.13.4"))
|
|
testImplementation("org.junit.jupiter:junit-jupiter")
|
|
testImplementation("org.scalatest:scalatest_3:${versions["SCALATEST"]!!}")
|
|
testImplementation("co.helmethair:scalatest-junit-runner:${versions["SCALATEST_JUNIT"]!!}")
|
|
|
|
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
|
|
}
|
|
|
|
tasks.test {
|
|
useJUnitPlatform {
|
|
includeEngines("scalatest")
|
|
testLogging {
|
|
events("skipped", "failed")
|
|
}
|
|
}
|
|
finalizedBy(tasks.reportScoverage)
|
|
}
|
|
tasks.reportScoverage {
|
|
dependsOn(tasks.test)
|
|
}
|