From 064c48a795011d01c1b2c50d7e033031e9d5d3a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krist=C3=B3f=20Marussy?= Date: Sun, 7 Apr 2024 14:09:34 +0200 Subject: [PATCH] fix(test): Windows line endings comparison --- .../test/java/tools/refinery/generator/ProblemLoaderTest.java | 4 +++- .../refinery/language/semantics/SolutionSerializerTest.java | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/subprojects/generator/src/test/java/tools/refinery/generator/ProblemLoaderTest.java b/subprojects/generator/src/test/java/tools/refinery/generator/ProblemLoaderTest.java index 0c0db1056..f0b546d77 100644 --- a/subprojects/generator/src/test/java/tools/refinery/generator/ProblemLoaderTest.java +++ b/subprojects/generator/src/test/java/tools/refinery/generator/ProblemLoaderTest.java @@ -47,7 +47,9 @@ void loadScopeConstraintsTest(String originalScopes, List scopes, List loadScopeConstraintsTest() { diff --git a/subprojects/language-semantics/src/test/java/tools/refinery/language/semantics/SolutionSerializerTest.java b/subprojects/language-semantics/src/test/java/tools/refinery/language/semantics/SolutionSerializerTest.java index be675a802..9f36445ae 100644 --- a/subprojects/language-semantics/src/test/java/tools/refinery/language/semantics/SolutionSerializerTest.java +++ b/subprojects/language-semantics/src/test/java/tools/refinery/language/semantics/SolutionSerializerTest.java @@ -72,7 +72,9 @@ void solutionSerializerTest(String prefix, String input, String expectedOutput) solution.eResource().save(outputStream, Map.of()); actualOutput = outputStream.toString(); } - assertThat(actualOutput, is(prefix + "\n" + expectedOutput)); + var normalizedResult = actualOutput.replace("\r\n", "\n"); + var normalizedExpected = (prefix + "\n" + expectedOutput).replace("\r\n", "\n"); + assertThat(normalizedResult, is(normalizedExpected)); } static Stream solutionSerializerTest() {