Skip to content

Commit

Permalink
polystat#16 tests cleaned up
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed Sep 20, 2021
1 parent 130f1de commit c123a37
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 17 deletions.
8 changes: 4 additions & 4 deletions src/test/java/org/polystat/PolystatTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@
*
* @since 0.1
*/
public final class PolystatTest {
final class PolystatTest {

@Test
public void publicEntrance() throws Exception {
void publicEntrance() throws Exception {
Polystat.main();
}

@Test
public void saysHello() throws Exception {
void saysHello() throws Exception {
final ByteArrayOutputStream out = new ByteArrayOutputStream();
new Polystat(new PrintStream(out)).exec();
MatcherAssert.assertThat(
Expand All @@ -58,7 +58,7 @@ public void saysHello() throws Exception {
}

@Test
public void analyzesOneEolangProgram(@TempDir final Path sources,
void analyzesOneEolangProgram(@TempDir final Path sources,
@TempDir final Path temp) throws Exception {
Files.write(
sources.resolve("foo.eo"),
Expand Down
5 changes: 2 additions & 3 deletions src/test/java/org/polystat/ProgramTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,11 @@
* Test case for {@link Program}.
*
* @since 0.1
* @checkstyle AbbreviationAsWordInNameCheck (3 lines)
*/
public final class ProgramTest {
final class ProgramTest {

@Test
public void interpretOneEolangProgram(@TempDir final Path sources,
void interpretOneEolangProgram(@TempDir final Path sources,
@TempDir final Path temp) throws Exception {
Files.write(
sources.resolve("foo.eo"),
Expand Down
6 changes: 3 additions & 3 deletions src/test/java/org/polystat/far/CalcTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@
*
* @since 0.1
*/
public final class CalcTest {
final class CalcTest {

@Test
public void buildsSimpleRulesXsl() {
void buildsSimpleRulesXsl() {
MatcherAssert.assertThat(
XhtmlMatchers.xhtml(new Calc("add(y) -> {{y 0}}").xsl()),
Matchers.allOf(
Expand All @@ -52,7 +52,7 @@ public void buildsSimpleRulesXsl() {
}

@Test
public void buildsRealRulesXsl() {
void buildsRealRulesXsl() {
MatcherAssert.assertThat(
XhtmlMatchers.xhtml(
new Calc(
Expand Down
8 changes: 4 additions & 4 deletions src/test/java/org/polystat/far/ExprTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@
* As inputs we should probably have the expressions and the output
* should be the expected result of the Expr class.
*/
public final class ExprTest {
final class ExprTest {

@Test
public void solvesSimpleExpression() {
void solvesSimpleExpression() {
final Expr expr = new Expr(
"((a=1 ∧ b=2) or (b=3)) and ((a=7) or (b=2 ∧ d=7))"
);
Expand All @@ -49,7 +49,7 @@ public void solvesSimpleExpression() {
}

@Test
public void failsSimpleExpression() {
void failsSimpleExpression() {
final Expr expr = new Expr(
"((a=1 ∧ b=2) or (d=4)) and ((d=5 ∧ a=7) or (b=6 ∧ d=1))"
);
Expand All @@ -60,7 +60,7 @@ public void failsSimpleExpression() {
}

@Test
public void ignoresNever() {
void ignoresNever() {
final Expr expr = new Expr(
String.format("((a=1 ∧ b=%s)) and ((a=1))", Expr.NEVER)
);
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 @@ -41,10 +41,10 @@
*
* @since 0.1
*/
public final class ReversesTest {
final class ReversesTest {

@Test
public void findsBugsInSimpleXml(@TempDir final Path sources,
void findsBugsInSimpleXml(@TempDir final Path sources,
@TempDir final Path temp) throws Exception {
Files.write(
sources.resolve("foo.eo"),
Expand All @@ -65,7 +65,7 @@ public void findsBugsInSimpleXml(@TempDir final Path sources,
}

@Test
public void findsNoBugsInSimpleXml(@TempDir final Path sources,
void findsNoBugsInSimpleXml(@TempDir final Path sources,
@TempDir final Path temp) throws Exception {
Files.write(
sources.resolve("bar.eo"),
Expand Down

0 comments on commit c123a37

Please sign in to comment.