Skip to content

Conversation

@rcosta358
Copy link
Collaborator

@rcosta358 rcosta358 commented Nov 21, 2025

This PR closes #105 by comparing the expected error with the actual error found for each test (it assumes each one contains exactly one error, and fails otherwise).

  • For singular test files, the expected error (title) should be written in the first line of the file as a comment.
  • For test directories, a .expected file should be included with the expected error.

The test suite now requires all failing tests to include the expected error (fails otherwise), providing more guarantees about the behavior of the verifier.

@rcosta358 rcosta358 self-assigned this Nov 21, 2025
@rcosta358 rcosta358 added the enhancement New feature or request label Nov 21, 2025
public static void main(String[] args) {
@Refinement("InRange( _, 10)")
@Refinement("InRange(j, 10)")
int j = 15;
Copy link
Collaborator Author

@rcosta358 rcosta358 Nov 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here we are getting a not found error instead of an argument mismatch error.
Needs to be fixed in the future by checking if the provided arguments match the alias definition.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in #127.

Copy link
Collaborator

@CatarinaGamboa CatarinaGamboa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Niceee! As a follow up we should add these details in the testing section of the README.

@@ -1,3 +1,4 @@
// Error
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this just error? we don't have a more specific type?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's the most general case, a.k.a. CustomError, but we can introduce more specific errors in the future.

@@ -1,3 +1,4 @@
// Error
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why just error?

@@ -1,3 +1,4 @@
// Error
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as below

@rcosta358 rcosta358 merged commit f59d1c4 into main Dec 4, 2025
1 check passed
@rcosta358 rcosta358 deleted the check-expected-error branch December 4, 2025 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Include error message in test suite checks

3 participants