-
Notifications
You must be signed in to change notification settings - Fork 22
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
#[drink::contract_bundle_provider] macro #73
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is great! I'd say it still may have the potential to make it even more user-friendly but we can definitely discuss this after merging of this one (which I think is already a great step)
} | ||
} | ||
|
||
pub fn generate_bundle_providing(&self, enum_item: ItemEnum) -> TokenStream2 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is extremely nitpicky but I'd prefer s/providing/provision/g
😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure, done!
Follow-up to #70 and #68.
We introduce a new macro
#[drink::contract_bundle_provider]
which provides a convenient way of obtaining contract bundles in drink testing.This bundling provision wasn't done within
#[drink:test]
macro so as to avoid generating enums and implementations per-testcase. Now the user has to (although they can still get bytes/transcoders manually or useContractBundle
API) add one new type to the test module:which will be expanded to:
(assuming that we are using it within
flipper
project and we havecounter
as a contract dependency inCargo.toml
)