Skip to content

Commit

Permalink
#15 rename
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed Sep 16, 2021
1 parent 40dd8c8 commit 5477b6e
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/main/java/org/polystat/Polystat.java
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public static void main(final String... args) throws Exception {
*/
public void exec(final String... args) throws Exception {
if (args.length == 2) {
final Func<String, XML> xmir = new XMIR(
final Func<String, XML> xmir = new Program(
Paths.get(args[0]), Paths.get(args[1])
);
for (final Analysis analysis : Polystat.ALL) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@
import org.eolang.parser.Xsline;

/**
* A collection of all EO files, which are accessible as XMIR elements.
* A collection of all EO files, which are accessible as XMIR elements,
* by their object locators.
*
* @since 1.0
* @todo #1:1h The current implementation is very primitive and doesn't
Expand All @@ -46,7 +47,7 @@
* and fetch a child.
* @checkstyle AbbreviationAsWordInNameCheck (5 lines)
*/
public final class XMIR implements Func<String, XML> {
public final class Program implements Func<String, XML> {

/**
* The directory with EO files.
Expand All @@ -63,7 +64,7 @@ public final class XMIR implements Func<String, XML> {
* @param src The dir with .eo sources
* @param tmp Temp dir with .xml files
*/
public XMIR(final Path src, final Path tmp) {
public Program(final Path src, final Path tmp) {
this.sources = src;
this.temp = tmp;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@
import org.junit.jupiter.api.Test;

/**
* Test case for {@link XMIR}.
* Test case for {@link Program}.
*
* @since 0.1
* @checkstyle AbbreviationAsWordInNameCheck (3 lines)
*/
public final class XMIRTest {
public final class ProgramTest {

@Test
public void interpretsOneEolangProgram() throws Exception {
Expand All @@ -51,8 +51,8 @@ public void interpretsOneEolangProgram() throws Exception {
).asString().getBytes(StandardCharsets.UTF_8)
);
final Path temp = Files.createTempDirectory("temp");
final XMIR xmir = new XMIR(sources, temp);
final XML foo = xmir.apply("\\Phi.foo");
final Program program = new Program(sources, temp);
final XML foo = program.apply("\\Phi.foo");
MatcherAssert.assertThat(
foo.xpath("@name").get(0),
Matchers.equalTo("foo")
Expand Down
6 changes: 3 additions & 3 deletions src/test/java/org/polystat/far/ReversesTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
import org.hamcrest.MatcherAssert;
import org.hamcrest.Matchers;
import org.junit.jupiter.api.Test;
import org.polystat.XMIR;
import org.polystat.Program;

/**
* Test case for {@link Reverses}.
Expand All @@ -54,7 +54,7 @@ public void findsBugsInSimpleXml() throws Exception {
final Path temp = Files.createTempDirectory("temp");
final Reverses reverses = new Reverses();
final Collection<String> bugs = reverses.errors(
new XMIR(sources, temp), "\\Phi.foo"
new Program(sources, temp), "\\Phi.foo"
);
MatcherAssert.assertThat(
bugs,
Expand All @@ -76,7 +76,7 @@ public void findsNoBugsInSimpleXml() throws Exception {
final Path temp = Files.createTempDirectory("temp2");
final Reverses reverses = new Reverses();
final Collection<String> bugs = reverses.errors(
new XMIR(sources, temp), "\\Phi.bar"
new Program(sources, temp), "\\Phi.bar"
);
MatcherAssert.assertThat(bugs, Matchers.emptyIterable());
}
Expand Down

0 comments on commit 5477b6e

Please sign in to comment.