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 testCoveredMethods #109

Merged

Conversation

DurieuxPol
Copy link
Collaborator

Fixes #103
The problem seemed to be that, since anUncoveredMethod is called in the setUp, it was called during the coverage analysis and so it was treated as being part of the tests. But since setUp is called only the first time, that's why the test was failing only the first time.
This way I make sure that the tests won't fail.

@DurieuxPol DurieuxPol requested a review from guillep April 9, 2024 09:42
@@ -8,7 +8,7 @@ Class {
{ #category : 'as yet unclassified' }
MTTestResourceClassForTestingCoverage >> doSomething [

^ MTClassForTestingCoverage new anUncoveredMethod
Copy link
Contributor

Choose a reason for hiding this comment

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

Ah yes, so if you call an uncovered method it will be covered :)

@guillep guillep merged commit f42e24e into pharo-contributions:master Apr 9, 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.

testCoveredMethods is red the first time it is run, then it's always green
2 participants