fix: replace .get with pattern match in FenExporterTest halfMoveClock round-trip
This commit is contained in:
@@ -83,5 +83,6 @@ class FenExporterTest extends AnyFunSuite with Matchers:
|
|||||||
status = GameStatus.InProgress
|
status = GameStatus.InProgress
|
||||||
)
|
)
|
||||||
val fen = FenExporter.gameStateToFen(gameState)
|
val fen = FenExporter.gameStateToFen(gameState)
|
||||||
val parsed = FenParser.parseFen(fen).get
|
FenParser.parseFen(fen) match
|
||||||
parsed.halfMoveClock shouldBe 42
|
case Some(gs) => gs.halfMoveClock shouldBe 42
|
||||||
|
case None => fail("FEN parsing failed")
|
||||||
|
|||||||
Reference in New Issue
Block a user