b4bc72f7e4
Build & Test (NowChessSystems) TeamCity build finished
Summary - Added scala-parser-combinators_3:2.4.0 dependency to modules/io - Implemented FenParserCombinators as an alternative FEN parser using RegexParsers, with the same public API as the existing FenParser - Parsers are built bottom-up: piece characters → rank tokens → rank → board, composed with explicit field separators into a full FEN parser - Added FenParserCombinatorsTest mirroring the existing FenParserTest to prove behavioural equivalence Test plan - All existing tests pass — FenParser and all other modules untouched - FenParserCombinatorsTest covers all cases: valid FEN, invalid color, invalid castling, invalid board shapes, en passant, round-trip via FenExporter - 100% line/branch/method coverage on FenParserCombinators Co-authored-by: LQ63 <lkhermann@web.de> Reviewed-on: #21 Reviewed-by: Janis <janis-e@gmx.de> Co-authored-by: Leon Hermann <lq@blackhole.local> Co-committed-by: Leon Hermann <lq@blackhole.local>
66 lines
1.5 KiB
Kotlin
66 lines
1.5 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(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)
|
|
}
|