Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
monticore
EmbeddedMontiArc
generators
MathPrettyPrinter
Commits
41fb22da
Commit
41fb22da
authored
Aug 17, 2018
by
0xJMR
Browse files
Second shot at fixing tests for Linux.
parent
5d0806ea
Pipeline
#69017
failed with stages
in 1 minute and 57 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/test/java/de/monticore/lang/monticar/mpp/montimath/HTMLMathPrettyPrinterTest.java
View file @
41fb22da
...
...
@@ -47,10 +47,8 @@ public class HTMLMathPrettyPrinterTest {
Optional
<
ASTMathCompilationUnit
>
astOptional
=
parser
.
parse
(
sourceModel
.
toString
());
String
input
=
FileUtils
.
readFileToString
(
targetModel
,
"UTF-8"
);
String
output
=
printer
.
prettyPrint
(
astOptional
.
get
());
String
separator
=
System
.
lineSeparator
();
assertEquals
(
StringUtils
.
countMatches
(
input
,
separator
),
StringUtils
.
countMatches
(
output
,
separator
));
assertEquals
(
input
.
replaceAll
(
"\\R"
,
""
),
output
.
replaceAll
(
"\\R"
,
""
));
assertEquals
(
input
.
replaceAll
(
"\\R"
,
"\n"
),
output
.
replaceAll
(
"\\R"
,
"\n"
));
}
}
}
src/test/java/de/monticore/lang/monticar/mpp/montimath/MathPrettyPrinterTest.java
View file @
41fb22da
...
...
@@ -48,10 +48,8 @@ public class MathPrettyPrinterTest {
Optional
<
ASTMathCompilationUnit
>
astOptional
=
parser
.
parse
(
sourceModel
.
toString
());
String
input
=
FileUtils
.
readFileToString
(
targetModel
,
"UTF-8"
);
String
output
=
printer
.
prettyPrint
(
astOptional
.
get
());
String
separator
=
System
.
lineSeparator
();
assertEquals
(
StringUtils
.
countMatches
(
input
,
separator
),
StringUtils
.
countMatches
(
output
,
separator
));
assertEquals
(
input
.
replaceAll
(
"\\R"
,
""
),
output
.
replaceAll
(
"\\R"
,
""
));
assertEquals
(
input
.
replaceAll
(
"\\R"
,
"\n"
),
output
.
replaceAll
(
"\\R"
,
"\n"
));
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment