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

Mocking constants and associated types in MockVM #1051

Open
qinsoon opened this issue Dec 18, 2023 · 0 comments
Open

Mocking constants and associated types in MockVM #1051

qinsoon opened this issue Dec 18, 2023 · 0 comments
Labels
P-normal Priority: Normal.

Comments

@qinsoon
Copy link
Member

qinsoon commented Dec 18, 2023

#1049 introduced MockVM, which can mock methods for VMBinding. MockVM stores closures (MockMethod) for each method, and dispatches the calls for each method to the mock closures. However, it does not allow mocking constants and associated types.

To support mocking constants and associated types, we will have to use macros to generate a new MockVM type each time. This is important to us if we want to have good code coverage from unit tests.

@wks wks added the P-normal Priority: Normal. label Dec 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P-normal Priority: Normal.
Projects
None yet
Development

No branches or pull requests

2 participants