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

Refactoring rotten green test on Context #13411

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/Kernel-Tests/ContextTest.class.st
Expand Up @@ -184,11 +184,11 @@ ContextTest >> testHasNonLocalReturn [
self deny: thisContext hasNonLocalReturn.
"this block context has no non-local return"
[ self deny: thisContext hasNonLocalReturn] value.
"but this"
[ self assert: thisContext hasNonLocalReturn. ^self] value.
"again, this is about the context locally, nested blocks to not count"
[ self deny: thisContext hasNonLocalReturn. [^self]] value.
[ self deny: thisContext hasNonLocalReturn. [self assert: thisContext hasNonLocalReturn. ^self]] value
[ self deny: thisContext hasNonLocalReturn. [ ^ self ] ] value.
[ self deny: thisContext hasNonLocalReturn ] value.
"We need to have the ^ self but as this assertion is at the end is not a problem if we return"
[ self assert: thisContext hasNonLocalReturn. ^ self ] value.
]

{ #category : #tests }
Expand Down