Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
93 additions
and
3,806 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
javaparser-testing/src/test/java/com/github/javaparser/ProblemTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package com.github.javaparser; | ||
|
||
import org.junit.Test; | ||
|
||
import static com.github.javaparser.Range.range; | ||
import static com.github.javaparser.utils.TestUtils.assertInstanceOf; | ||
import static org.junit.Assert.assertEquals; | ||
|
||
public class ProblemTest { | ||
@Test | ||
public void testSimpleGetters() { | ||
Problem problem = new Problem("Parse error", range(10, 10, 20, 20), new Exception()); | ||
|
||
assertEquals(range(10, 10, 20, 20), problem.getLocation().get()); | ||
assertEquals("Parse error", problem.getMessage()); | ||
assertInstanceOf(Exception.class, problem.getCause().get()); | ||
} | ||
|
||
@Test | ||
public void testVerboseMessage() { | ||
Problem problem = new Problem("Parse error", range(10, 10, 20, 20), null); | ||
|
||
assertEquals("Parse error at (line 10,col 10)", problem.getVerboseMessage()); | ||
} | ||
@Test | ||
public void testVerboseMessageWithoutLocation() { | ||
Problem problem = new Problem("Parse error", null, null); | ||
|
||
assertEquals("Parse error", problem.getVerboseMessage()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
...ng/src/test/resources/com/github/javaparser/bulk_test_results/javaparser_test_results.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
javaparser-testing/target/test-classes/com/github/javaparser/TestFileIso88591.java | ||
Lexical error at line 5, column 22. Encountered: "\ufffd" (65533), after : "" | ||
javaparser-testing/src/test/resources/com/github/javaparser/TestFileIso88591.java | ||
Lexical error at line 5, column 22. Encountered: "\ufffd" (65533), after : "" |
Oops, something went wrong.