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

New test filters #82

Merged
merged 12 commits into from
Feb 22, 2024
Merged

Conversation

DurieuxPol
Copy link
Collaborator

@DurieuxPol DurieuxPol commented Feb 19, 2024

Added 2 new test filters:

  • MTBlockTestFilter which selects tests based on the given block
  • MTPragmaRejectionTestFilter which rejects tests that contain a given pragma
  • MTPragmaSelectionTestFilter which selects tests that contain a given pragma

Copy link
Contributor

@guillep guillep left a comment

Choose a reason for hiding this comment

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

Merci @DurieuxPol !

Why one of the filters rejects while the other filter selects?
That will confuse people (starting by myself :D)

@DurieuxPol
Copy link
Collaborator Author

Because to me, you want to use pragma in tests as flags that specify which tests you don't want to run.
It seems easier than adding a pragma to all the tests you wanna run when you only want to ignore 2 or 3.
But I can change the pragma filter, or even add one that selects pragma instead.

@guillep
Copy link
Contributor

guillep commented Feb 21, 2024

I understand, maybe the name should be more explicit... But to me either the filters do filter out (reject) or select.
In this sense "PragmaTestFilter" could be "AvoidPragmaTestFilter".

@DurieuxPol
Copy link
Collaborator Author

I agree, I should rename it.
Maybe I can do 2 pragma filters, one that rejects pragma, and one that selects ? So that both use cases are considered ?

assert: (analysis generalResult particularResults at: 1) runCount
equals: 1
assert: (result mutantResults at: 1) selector
equals: #test10Milliseconds
Copy link
Contributor

Choose a reason for hiding this comment

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

Oh yes this seems nicer!

Copy link
Contributor

@guillep guillep left a comment

Choose a reason for hiding this comment

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

Good! Thanks @DurieuxPol !

@guillep guillep merged commit 044fb70 into pharo-contributions:master Feb 22, 2024
4 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