smalltalkCI icon indicating copy to clipboard operation
smalltalkCI copied to clipboard

Fix handling of traits for coverage testing

Open LinqLover opened this issue 1 year ago • 3 comments

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 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.

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

LinqLover avatar Sep 29 '22 18:09 LinqLover

Is this ready for review?

fniephaus avatar Oct 09 '22 09:10 fniephaus

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

fniephaus avatar Oct 09 '22 11:10 fniephaus

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 ...

LinqLover avatar Oct 09 '22 16:10 LinqLover