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

Added a check to prevent slots from being used when verifying multiple calls #533

Merged
merged 2 commits into from Nov 29, 2020

Conversation

Raibaz
Copy link
Collaborator

@Raibaz Raibaz commented Nov 24, 2020

This checks if a verify block contains the same function more than once and slots are being used to capture its arguments.

If this is the case, the captured property of the slot will contain only the argument of the last call, with the tests not behaving as expected.

An exception is now thrown in this case, to suggest using a mutableList to capture arguments.

This should fix #352 by clarifying to users the right way to capture multiple invocations of the same function.

@Raibaz Raibaz requested a review from oleksiyp November 27, 2020 09:40
@Raibaz Raibaz merged commit 06c5e73 into master Nov 29, 2020
@Raibaz Raibaz deleted the fix-issue-352 branch February 28, 2021 22:17
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.

Bug: capture Slots in multiple verifications capture only last value
1 participant