Skip to content

Commit 0014a9c

Browse files
committed
#3847: more
1 parent afdb851 commit 0014a9c

6 files changed

Lines changed: 16 additions & 12 deletions

File tree

eo-parser/src/test/java/benchmarks/XmirBench.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,13 @@
4949
@Warmup(iterations = 3, time = 1, timeUnit = TimeUnit.MILLISECONDS)
5050
@Measurement(iterations = 10, time = 1, timeUnit = TimeUnit.MILLISECONDS)
5151
@State(Scope.Benchmark)
52+
@SuppressWarnings({"JTCOP.RuleAllTestsHaveProductionClass", "JTCOP.RuleCorrectTestName"})
5253
public class XmirBench {
5354

5455
/**
5556
* Large XMIR document.
5657
*/
57-
private final XML xmir = new LargeXmir("noname", "com/sun/jna/Klass.class").it();
58+
private final XML xmir = new LargeXmir("noname", "com/sun/jna/Klass.class").xml();
5859

5960
@Benchmark
6061
public void xmirToEO() {

eo-parser/src/test/java/benchmarks/XslBench.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,13 @@
5151
@Warmup(iterations = 3, time = 1, timeUnit = TimeUnit.MILLISECONDS)
5252
@Measurement(iterations = 10, time = 1, timeUnit = TimeUnit.MILLISECONDS)
5353
@State(Scope.Benchmark)
54+
@SuppressWarnings({"JTCOP.RuleAllTestsHaveProductionClass", "JTCOP.RuleCorrectTestName"})
5455
public class XslBench {
5556

5657
/**
5758
* Large XMIR document.
5859
*/
59-
private final XML xmir = new LargeXmir().it();
60+
private final XML xmir = new LargeXmir().xml();
6061

6162
/**
6263
* All sheets to use.

eo-parser/src/test/java/fixtures/LargeXmir.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
*
4242
* @since 0.51
4343
*/
44+
@SuppressWarnings({"JTCOP.RuleAllTestsHaveProductionClass", "JTCOP.RuleCorrectTestName"})
4445
public final class LargeXmir {
4546

4647
/**
@@ -71,17 +72,18 @@ public LargeXmir(final String nme) {
7172
/**
7273
* Constructor.
7374
* @param nme Program name.
75+
* @param path The path to the file
7476
*/
7577
public LargeXmir(final String nme, final String path) {
7678
this.name = nme;
7779
this.file = path;
7880
}
7981

8082
/**
81-
* Build it.
83+
* Build xml.
8284
* @return XML
8385
*/
84-
public XML it() {
86+
public XML xml() {
8587
try {
8688
return this.unsafe();
8789
} catch (final IOException ex) {
@@ -90,7 +92,7 @@ public XML it() {
9092
}
9193

9294
/**
93-
* Build it.
95+
* Build xml.
9496
* @return XML
9597
*/
9698
private XML unsafe() throws IOException {

eo-parser/src/test/java/org/eolang/parser/EoSyntaxTest.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ void parsesArrow() throws IOException {
172172
MatcherAssert.assertThat(
173173
EoIndentLexerTest.TO_ADD_MESSAGE,
174174
new EoSyntax(
175-
"test-it-3",
175+
"test-xml-3",
176176
new InputOf("1 > x")
177177
).parsed(),
178178
XhtmlMatchers.hasXPaths(
@@ -196,7 +196,7 @@ void parsesNested() throws IOException {
196196
MatcherAssert.assertThat(
197197
EoIndentLexerTest.TO_ADD_MESSAGE,
198198
new EoSyntax(
199-
"test-it-4",
199+
"test-xml-4",
200200
new InputOf(src)
201201
).parsed(),
202202
XhtmlMatchers.hasXPaths(
@@ -211,7 +211,7 @@ void parsesDefinition() throws IOException {
211211
MatcherAssert.assertThat(
212212
EoIndentLexerTest.TO_ADD_MESSAGE,
213213
new EoSyntax(
214-
"test-it-5",
214+
"test-xml-5",
215215
new InputOf(
216216
String.join(
217217
"\n",
@@ -233,11 +233,11 @@ void parsesMethodCalls() throws IOException {
233233
MatcherAssert.assertThat(
234234
EoIndentLexerTest.TO_ADD_MESSAGE,
235235
new EoSyntax(
236-
"test-it-1",
236+
"test-xml-1",
237237
new InputOf("add.\n 0\n true")
238238
).parsed(),
239239
XhtmlMatchers.hasXPaths(
240-
"/program[@name='test-it-1']",
240+
"/program[@name='test-xml-1']",
241241
"/program/objects/o[@base='.add']",
242242
"/program/objects/o/o[@base='number']",
243243
"/program/objects/o/o[@base='true']"

eo-parser/src/test/java/org/eolang/parser/StEoLoggedTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ void printsMessageWithEoIfExceptionIsThrown() {
8686
Assertions.assertThrows(
8787
IllegalStateException.class,
8888
() -> new StEoLogged(new StFailure(), log).apply(1, StEoLoggedTest.example()),
89-
"We expect that shift will throw an exception, but it didn't"
89+
"We expect that shift will throw an exception, but xml didn't"
9090
);
9191
MatcherAssert.assertThat(
9292
String.format(

eo-parser/src/test/resources/org/eolang/parser/eo-typos/redundant-parentheses/simple-application.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ line: 3
2424
# @todo #3706:30min Unreadable error message if program declaration is invalid.
2525
# Improve error message for the case when a program declaration is invalid.
2626
# The error message should be more informative and should point to the exact
27-
# place in the input where the error occurred. Moreover it should be clear
27+
# place in the input where the error occurred. Moreover xml should be clear
2828
# what to do to fix the error. 'simple-application-named.yaml' has the same issue.
2929
message: |+
3030
[3:-1] error: 'We expected the program to end here but encountered something unexpected'

0 commit comments

Comments
 (0)