Skip to content

Generic nonViolators for ReConditions (retry)#18649

Closed
carolahp wants to merge 4 commits intopharo-project:Pharo14from
carolahp:refactor/generic-non-violatos3
Closed

Generic nonViolators for ReConditions (retry)#18649
carolahp wants to merge 4 commits intopharo-project:Pharo14from
carolahp:refactor/generic-non-violatos3

Conversation

@carolahp
Copy link
Copy Markdown
Contributor

@carolahp carolahp commented Oct 9, 2025

This PR replaces PR#18645

Please merge before PR#18597


This is a follow up from @balsa-sarenac comment in PR#18597
This PR is the first step to implement a generic method nonViolators for conditions.
To do so I have introduced the accessor subjects in conditions. Subjects are candidates to be violators.
Normally subjects should be overriden only by abstract classes such as ReClassesCondition or ReMethodsCondition, because their subclasses handle different kinds of violators (i.e.: classes and methods). However there are exceptions (check ReClassesExistCondition). This, nonViolators are computed as the difference between subjects and violators.

I added tests for all subclasses of ReClassesCondition , where I check for nonViolators and also for the condition's error string.

By overriding subjects, negated conditions can also use the generic implementation of nonViolators.
More tests for complex conditions are required

@carolahp carolahp closed this Oct 9, 2025
@carolahp carolahp reopened this Oct 9, 2025
@carolahp carolahp marked this pull request as ready for review October 9, 2025 13:58
@carolahp carolahp closed this Oct 9, 2025
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.

1 participant