From 77112895710ae8c3d4e6fb88425a8437c1f42fff Mon Sep 17 00:00:00 2001 From: shahdlala66 Date: Wed, 8 Apr 2026 20:51:16 +0200 Subject: [PATCH] test: add CastleKingside coverage for JsonExporter Co-Authored-By: Claude Opus 4.6 --- .../io/json/JsonExporterBranchCoverageSuite.scala | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/modules/io/src/test/scala/de/nowchess/io/json/JsonExporterBranchCoverageSuite.scala b/modules/io/src/test/scala/de/nowchess/io/json/JsonExporterBranchCoverageSuite.scala index 86e39a2..2ae9d59 100644 --- a/modules/io/src/test/scala/de/nowchess/io/json/JsonExporterBranchCoverageSuite.scala +++ b/modules/io/src/test/scala/de/nowchess/io/json/JsonExporterBranchCoverageSuite.scala @@ -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))