Skip to content

Generic nonViolators for ReConditions (retry)#18651

Merged
Ducasse merged 7 commits intopharo-project:Pharo14from
carolahp:refactor/generic-non-violatos5
Oct 10, 2025
Merged

Generic nonViolators for ReConditions (retry)#18651
Ducasse merged 7 commits intopharo-project:Pharo14from
carolahp:refactor/generic-non-violatos5

Conversation

@carolahp
Copy link
Copy Markdown
Contributor

@carolahp carolahp commented Oct 9, 2025

This PR replaces #18645

Please merge before #18597

This is a follow up from @balsa-sarenac comment in #18597 (comment)
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
Copy link
Copy Markdown
Contributor Author

carolahp commented Oct 9, 2025

Failing tests are unrelated
image

@Ducasse Ducasse merged commit 434fed3 into pharo-project:Pharo14 Oct 10, 2025
1 check failed
@carolahp carolahp deleted the refactor/generic-non-violatos5 branch October 14, 2025 03:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants