Open
Conversation
rcosta358
requested changes
Mar 14, 2026
liquidjava-verifier/src/test/java/liquidjava/api/tests/TestExamples.java
Outdated
Show resolved
Hide resolved
liquidjava-verifier/src/test/java/liquidjava/api/tests/TestExamples.java
Outdated
Show resolved
Hide resolved
liquidjava-verifier/src/test/java/liquidjava/api/tests/TestExamples.java
Outdated
Show resolved
Hide resolved
liquidjava-verifier/src/test/java/liquidjava/utils/TestUtils.java
Outdated
Show resolved
Hide resolved
liquidjava-verifier/src/test/java/liquidjava/api/tests/TestExamples.java
Outdated
Show resolved
Hide resolved
liquidjava-verifier/src/test/java/liquidjava/utils/TestUtils.java
Outdated
Show resolved
Hide resolved
liquidjava-verifier/src/test/java/liquidjava/utils/TestUtils.java
Outdated
Show resolved
Hide resolved
| try { | ||
| List<Path> files = Files.list(dirPath).filter(Files::isRegularFile).toList(); | ||
| for (Path file : files) { | ||
| getExpectedErrorsFromFile(file).forEach(expectedErrors::add); |
| <artifactId>maven-surefire-plugin</artifactId> | ||
| <version>3.2.1</version> | ||
| <configuration> | ||
| <trimStackTrace>true</trimStackTrace> |
1370c86 to
1b9d5ac
Compare
Should now print the line of code throwing the error, as well as the error type and description.
Instead of using separate files or stating at the top of a class file the error that it should report, now it is read and all correctly defined errors are added to a list. It is then checked against the first error that occurred and reports back. Still only works with a single error reported, however.
Errors are now gathered with their line number and compared based on the message and position. Added a Pair record to
1b9d5ac to
46c131a
Compare
Used existing Pairs, removing old code. Changed the way strings are matched via Regex.
Collaborator
|
Great! Now that we can have multiple failures, all that's left to do is merge some failing tests, e.g., |
Due to multiple error check/annotation, some tests have been merged into single files to reduce testing workload. Math tests need to be reviewed due to weird behavior if the refinements aren't alone in the same folder as the test.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #174 . These changes allow for inline error tests via a comment similar to how some are currently done but with a separate
.expectedfile.The file (or files in a given directory) is read line-by-line and, if a line has at the end a comment with the
Errorstring, it is considered an error that the code in question should report. By implementing a pair to track message and line number, we can make sure that both properties are fulfilled when checking a reported error, and not simply the title. Due to non-deterministic variable naming, entire error line checking was not implemented.Incorrect error placement

Passing test

To reduce unnecessary noise in the suite, the
maven-surefire-pluginhas a configuration that cuts the stack-trace at the end of the tests, since we're not gonna use it to observe test behavior.These changes WILL break the test suite, as every file and folder will need to be refactored to accommodate the new method of error reporting.