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

Make it easier to diagnose mock failures by printing message sends properly and storing the send history in the mock #16555

Conversation

macta
Copy link
Contributor

@macta macta commented Apr 30, 2024

Probably many more fixes to add but this helps a little bit

…operly and storing the send history in the mock
@macta
Copy link
Contributor Author

macta commented Apr 30, 2024

This fix makes the debugger look like this (which is slightly easier to read and diagnose). I think there are more pragmatic and simple fixes we can make to help make mocks helpful without overdoing things.

image

Possibly I should remove the "Expected Message" prefix, so that the messages and failed collections better line up for an easier comparision.
Also - would be tempted to rename messages and failed variables to expected and actual to make it a bit more obvious.

macta and others added 3 commits April 30, 2024 09:18
… a normal messsage send, making it easier to compare in the debugger on a failure. (simpler is better)
@macta
Copy link
Contributor Author

macta commented Apr 30, 2024

After previous comment, I tried simplifiying the printOn: and it works better - so have adjusted it:
image

@jecisc jecisc merged commit d57a508 into pharo-project:Pharo13 May 6, 2024
1 of 2 checks passed
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.

None yet

3 participants