Skip to content

Commit

Permalink
Merge pull request #1961 from jplag/feature/tokenPositionTestNames
Browse files Browse the repository at this point in the history
Added names to token position tests
  • Loading branch information
tsaglam authored Sep 4, 2024
2 parents 644cdb8 + 6c505ea commit ca2a891
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ public class TokenPositionTestData implements TestData {
private final List<TokenData> expectedTokens;

private final String descriptor;
private final String fileName;

/**
* @param testFile The file containing the test specifications
Expand All @@ -30,6 +31,7 @@ public TokenPositionTestData(File testFile) throws IOException {
this.sourceLines = new ArrayList<>();
this.expectedTokens = new ArrayList<>();
this.descriptor = "(Token position file: " + testFile.getName() + ")";
this.fileName = testFile.getName();
this.readFile(testFile);
}

Expand Down Expand Up @@ -89,4 +91,9 @@ public List<TokenData> getExpectedTokens() {
*/
public record TokenData(String typeName, int lineNumber, int columnNumber, int length) {
}

@Override
public String toString() {
return this.fileName;
}
}

0 comments on commit ca2a891

Please sign in to comment.