Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests: Enable analysis of multiple test markers in a test file #953

Merged

Conversation

ans-bar-bm
Copy link
Contributor

Fixes #952.

As described in the issue, currently only the first marker is evaluated (see file CodeMarkup.cs method GetLocator).
This PR adds support for all markers, while keeping the existing option to only test for one (the first) marker.
Two new methods for all markers were added, and i applied them to all the test classes: HasDiagnosticAtAllMarkers and NoDiagnosticAtAllMarkers.

It seems that most test cases were still correct, the only error this change surfaced was a testcase for LC0005:

i := [|Database|]::MyTable; // this was expecting a diagnostic, but "Database" is actually correct casing
i := [|database|]::MyTable; // changed to the likely intended testcase of "database" being incorrect casing

If this change is correct and should be merged, then it may be good to check any PRs that are outstanding or were merged in the meantime to also use the "all markers" methods.

Any feedback is very much welcome :)

@Arthurvdv
Copy link
Collaborator

This is awesome, thank you so much for fixing this!

I had some issue with multiple markers, where I couldn't find what went wrong.

@Arthurvdv Arthurvdv merged commit fd3e52c into StefanMaron:prerelease Feb 19, 2025
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants