-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
test view function with struct arguments and generic type parameters #7761
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.
Nice! Cc @xindingw
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.
Why not add an API test instead to make sure things work e2e?
@@ -21,21 +25,26 @@ const OBJECT_ADDRESS: AccountAddress = AccountAddress::new([ | |||
0x90, 0x71, 0xAA, 0x3F, 0xBD, 0x2A, 0xB9, 0x51, 0x37, 0xF7, 0xCB, 0xAD, 0x13, 0x6F, 0x09, 0x2B, | |||
]); | |||
|
|||
fn success(tests: Vec<(&str, Vec<Vec<u8>>, &str)>) { | |||
success_generic(vec![], tests) | |||
fn module_data() -> StructTag { |
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.
nit: maybe have a static variable with lazy initialization like here
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
✅ Forge suite
|
✅ Forge suite
|
✅ Forge suite
|
…ptos-labs#7761) * add test for view * Add test for generic view struct parameter * Remove api tests * small fix * fmt * fmt
Description
Add test for a view function with a generic type parameter taking Object
Test Plan