-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add method name to execution message and call syscall #112
Conversation
Factor in review comments Integration test passing
Move call syscall implementation to new location
Finish updating host fn signatures Adding entrypoint test
Fixed some bugs and did some cleanup
tests/entrypoint/src/main.rs
Outdated
#[allow(dead_code)] | ||
fn test3() { | ||
// no-op | ||
} |
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.
What's the point of having it?
#[allow(dead_code)] | |
fn test3() { | |
// no-op | |
} |
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.
the point is that this test should fail:
Lines 208 to 226 in 74b036a
// this will execute a specific method | |
let result = AthenaVm::new().execute( | |
&mut host, | |
AthenaRevision::AthenaFrontier, | |
AthenaMessage::new( | |
MessageKind::Call, | |
0, | |
1000000, | |
Address::default(), | |
Address::default(), | |
None, | |
Some("athexp_test3".as_bytes().to_vec()), | |
Balance::default(), | |
vec![], | |
), | |
elf, | |
); | |
// this should fail, as this method is not `callable` | |
assert_eq!(result.status_code, StatusCode::Failure); |
In other words, a method not marked #[callable]
shouldn't be callable
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.
It sounds more like a test of the procedural macro (which would check that methods not marked #[callable]
are not exported in the macro). This test here would (should) fail even fn test3()
was removed, right (it wouldn't find the method)?
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.
correct, but that would be testing something different :) if you think these tests should be restructured/moved, we can do that.
Co-authored-by: Bartosz Różański <bartek.roza@gmail.com>
Closes #111