Skip to content

Commit

Permalink
Added names to token position tests
Browse files Browse the repository at this point in the history
  • Loading branch information
TwoOfTwelve committed Sep 3, 2024
1 parent 644cdb8 commit 6c505ea
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 6c505ea

Please sign in to comment.