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

Fix handling of traits for coverage testing #572

Draft
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

LinqLover
Copy link
Collaborator

The implementation mostly follows the design of SUnit coverage for traits.2.cs1, this implementation for smalltalkCI also makes the following changes:

  • Moves exclusion of methods derived from traits up from Pharo's overrides of #allClassesToCover to new SCICodeCoverage class>>#cannotBeCovered:
  • Moves check for abstract methods from SCICodeCoverage class>>#isExcluded: to SCICodeCoverage class>>#cannotBeCovered:. Consequently, abstract methods will no longer be displayed as "ignored" but hidden entirely from the coverage report.

Also updates the relevant documentation.

To try it out, you can follow the steps from here.

Follow-up of #571. Complements SUnit coverage for traits.2.cs for Squeak and depends on Traits-eventualUsers.3.cs. The dependency is non-technical, i.e., this PR is written without introducing a hard dependency on Traits, but no change in behavior will reveal before the changeset is merged into the Traits package, and I believe it's a better idea to wait for potential feedback on that patch before merging this PR.

Footnotes

  1. [squeak-dev] Review Request: TestCoverage-traits.1.cs

LinqLover and others added 5 commits September 29, 2022 19:19
Implement and test proper handling of class-side methods, extension methods, trait methods, and special message selectors.
Depends on Traits-eventualUsers.3.cs and complements SUnit coverage for traits.2.cs. [1]

The implementation mostly follows the design of SUnit coverage for traits.2.cs [1], this implementation for smalltalkCI also makes the following changes:
* Moves exclusion of methods derived from traits up from Pharo's overrides of #allClassesToCover to new SCICodeCoverage class>>#cannotBeCovered:
* Moves check for abstract methods from SCICodeCoverage class>>#isExcluded: to SCICodeCoverage class>>#cannotBeCovered:. Consequently, abstract methods will no longer will be displayed as "ignored" but hidden at all from the coverage report.

[1] https://lists.squeakfoundation.org/pipermail/squeak-dev/2022-September/222291.html
@fniephaus
Copy link
Member

Is this ready for review?

@fniephaus
Copy link
Member

After integrating #571, there are now some merge conflicts. Would be great if you could address them. Thanks!

@LinqLover
Copy link
Collaborator Author

This one is not yet ready. :-) It depends on SUnit coverage for traits.2.cs for Traits which is not yet merged but I still need to apply some feedback and then update this PR. I will ping you again when it is ready for review ...

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.

None yet

2 participants