Commit 9cf8b662 authored by Jean-Marc Ronck's avatar Jean-Marc Ronck
Browse files

Fixes build after license change.

parent 4efb5cc9
Pipeline #175323 passed with stages
in 2 minutes and 39 seconds
...@@ -13,6 +13,7 @@ import java.io.File; ...@@ -13,6 +13,7 @@ import java.io.File;
import java.io.IOException; import java.io.IOException;
import java.nio.file.Path; import java.nio.file.Path;
import java.nio.file.Paths; import java.nio.file.Paths;
import java.util.List;
import java.util.Optional; import java.util.Optional;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
...@@ -48,8 +49,11 @@ public class HTMLMathPrettyPrinterTest { ...@@ -48,8 +49,11 @@ public class HTMLMathPrettyPrinterTest {
Log.info(message, "HTMLMathPrettyPrinterTest"); Log.info(message, "HTMLMathPrettyPrinterTest");
Optional<ASTMathCompilationUnit> astOptional = parser.parse(sourceModel.toString()); List<String> sourceLines = FileUtils.readLines(sourceModel, "UTF-8");
String input = FileUtils.readFileToString(targetModel, "UTF-8"); String source = String.join("\n", sourceLines.subList(1, sourceLines.size()));
Optional<ASTMathCompilationUnit> astOptional = parser.parse_String(source);
List<String> targetLines = FileUtils.readLines(targetModel, "UTF-8");
String input = String.join("\n", targetLines.subList(1, targetLines.size()));
String output = printer.prettyPrint(astOptional.get()); String output = printer.prettyPrint(astOptional.get());
assertEquals(input.replaceAll("\\R+", "\n"), output.replaceAll("\\R+", "\n")); assertEquals(input.replaceAll("\\R+", "\n"), output.replaceAll("\\R+", "\n"));
......
...@@ -13,6 +13,7 @@ import java.io.File; ...@@ -13,6 +13,7 @@ import java.io.File;
import java.io.IOException; import java.io.IOException;
import java.nio.file.Path; import java.nio.file.Path;
import java.nio.file.Paths; import java.nio.file.Paths;
import java.util.List;
import java.util.Optional; import java.util.Optional;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
...@@ -46,8 +47,11 @@ public class MathPrettyPrinterTest { ...@@ -46,8 +47,11 @@ public class MathPrettyPrinterTest {
Log.info(message, "MathPrettyPrinterTest"); Log.info(message, "MathPrettyPrinterTest");
Optional<ASTMathCompilationUnit> astOptional = parser.parse(sourceModel.toString()); List<String> sourceLines = FileUtils.readLines(sourceModel, "UTF-8");
String input = FileUtils.readFileToString(targetModel, "UTF-8"); String source = String.join("\n", sourceLines.subList(1, sourceLines.size()));
Optional<ASTMathCompilationUnit> astOptional = parser.parse_String(source);
List<String> targetLines = FileUtils.readLines(targetModel, "UTF-8");
String input = String.join("\n", targetLines.subList(1, targetLines.size()));
String output = printer.prettyPrint(astOptional.get()); String output = printer.prettyPrint(astOptional.get());
assertEquals(input.replaceAll("\\R+", "\n"), output.replaceAll("\\R+", "\n")); assertEquals(input.replaceAll("\\R+", "\n"), output.replaceAll("\\R+", "\n"));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment