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

Merge MethodCallReturn into MethodCall #717

Merged
merged 3 commits into from
Nov 4, 2018

Conversation

stakx
Copy link
Contributor

@stakx stakx commented Nov 4, 2018

This will make it possible to remove quite a bit of duplicate code in the Mock class' internal static methods later on.

Merging MethodCallReturn and MethodCall could easily increase the resulting class' memory footprint when it only represents void methods. Because of this, we merge some fields as well. The net result should be a minimally higher memory footprint for void methods, and a smaller memory footprint for non-void methods.

This will make it possible to remove quite a bit of duplicate code in
the `Mock` class' internal static methods.

Merging `MethodCallReturn` and `MethodCall` could easily make the re-
sulting class heavier for void methods. Because of this, we merge some
fields as well. The net result should be a slightly higher memory
footprint for void methods, and a smaller memory footprint for non-
void methods.
The setup functions `.AtMostOnce()` and `.AtMost(n)` are deprecated
and probably used only sparingly in practice. This commit offloads all
state associated with these methods into a separate object.
@stakx stakx merged commit 08c5f5f into devlooped:master Nov 4, 2018
@stakx stakx deleted the merge-methodcall-methodcallreturn branch November 4, 2018 19:46
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.

None yet

1 participant