From 6b7befe71513d3d314f64756fb45848df1b8fcc5 Mon Sep 17 00:00:00 2001 From: Jean-Marc Astesana Date: Thu, 7 Jul 2022 17:10:16 +0200 Subject: [PATCH] Fixes UnicodePrinterTest (does'nt compile in java 8 and fails in 11) --- pom.xml | 4 ++-- .../bhlangonijr/chesslib/unicode/UnicodePrinterTest.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index 34cc75c..f127a83 100644 --- a/pom.xml +++ b/pom.xml @@ -29,8 +29,8 @@ maven-compiler-plugin 3.8.1 - 1.8 - 1.8 + 11 + 11 diff --git a/src/test/java/com/github/bhlangonijr/chesslib/unicode/UnicodePrinterTest.java b/src/test/java/com/github/bhlangonijr/chesslib/unicode/UnicodePrinterTest.java index 37e4923..6057862 100644 --- a/src/test/java/com/github/bhlangonijr/chesslib/unicode/UnicodePrinterTest.java +++ b/src/test/java/com/github/bhlangonijr/chesslib/unicode/UnicodePrinterTest.java @@ -24,7 +24,7 @@ public void testPrintBoard() { printer.print(board); String repr = baos.toString(StandardCharsets.UTF_8); - assertEquals("Should be a white rook", '\u2656', repr.charAt(0)); - assertEquals("Should be a black rook", '\u265C', repr.charAt(63)); + assertEquals("Should be a white rook at pos 0\n"+repr, '\u2656', repr.charAt(0)); + assertEquals("Should be a black rook at pos 63\n"+repr, '\u265C', repr.split("\n")[7].charAt(7)); } }