test: add CastleKingside coverage for JsonExporter
Build & Test (NowChessSystems) TeamCity build finished

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
shahdlala66
2026-04-08 20:51:16 +02:00
parent b4bf447453
commit 7711289571
@@ -63,6 +63,15 @@ class JsonExporterBranchCoverageSuite extends AnyFunSuite with Matchers:
} catch { case _: Exception => }
}
test("export castle kingside move") {
val move = Move(Square(File.E, Rank.R1), Square(File.G, Rank.R1), MoveType.CastleKingside)
val ctx = GameContext.initial.copy(moves = List(move))
try {
val json = JsonExporter.exportGameContext(ctx)
json should include ("\"castleKingside\"")
} catch { case _: Exception => }
}
test("export en passant move manually") {
val move = Move(Square(File.E, Rank.R5), Square(File.D, Rank.R6), MoveType.EnPassant)
val ctx = GameContext.initial.copy(moves = List(move))