Skip to content

Commit

Permalink
💚 fix warning (from pmd) on test
Browse files Browse the repository at this point in the history
  • Loading branch information
The-Lum committed Mar 13, 2024
1 parent 4b8fad1 commit 53a95f8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
6 changes: 4 additions & 2 deletions app/src/test/java/math/ATest.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package math;

import static org.junit.jupiter.api.Assertions.assertNotNull;

import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.CsvSource;

Expand All @@ -10,9 +12,9 @@ class ATest {
@CsvSource(value = {
" a ",
})
public void atest(String input) {
void atest(String input) {
final String res = cut.getTeX(input);
System.out.println(input + " -> " + res);
assert(true);
assertNotNull(res, "Result must be not null");
}
}
2 changes: 1 addition & 1 deletion app/src/test/java/math/MathTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class MathTest {
" f_g, {{f}_{{g}}} ",
" '[[1,2,3],[4,5,6]]', {\\left[\\begin{matrix}{1}&{2}&{3}\\\\{4}&{5}&{6}\\end{matrix}\\right]} ",
})
public void testMath(String input, String expected) {
void testMath(String input, String expected) {
final String res = new ASCIIMathTeXImg().getTeX(input);
assertEquals(expected, res);
}
Expand Down
6 changes: 4 additions & 2 deletions app/src/test/java/math/UnitTestGen.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package math;

import static org.junit.jupiter.api.Assertions.assertNotNull;

import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.params.ParameterizedTest;
Expand Down Expand Up @@ -505,11 +507,11 @@ static void initAll() {
"/4",
"lim_(x rarr 2^-) f(x)",
})
public void test(String input) {
void test(String input) {
final String res = cut.getTeX(input);
String out = "\t\t\"'" + input + "',\t'" + res + "'\",";
System.out.println(out.replace("\\","\\\\"));
assert(true);
assertNotNull(res, "Result must be not null");
}

@AfterAll
Expand Down

0 comments on commit 53a95f8

Please sign in to comment.