-
Notifications
You must be signed in to change notification settings - Fork 5
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
adds unit/integration tests #69
Conversation
@dpfens, we have received your signed contributor license agreement. The review is usually completed within a week, but may take longer under certain circumstances. Another comment will be added to the pull request to notify you when the merge can proceed. |
@dpfens, VMware has approved your signed contributor license agreement. |
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.
Thank you for this contribution @dpfens! LGTM, some minor changes suggested :)
@ereslibre I applied the changes you suggested, in addition to splitting out the |
Thanks @dpfens for your contribution! |
wasm_runtime/src/c_api.rs
Outdated
use crate::config::WASM_RUNTIME_CONFIGS; | ||
|
||
#[test] | ||
fn wasm_wasm_module_load() { |
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.
Just to keep coherence with other test cases naming convention:
fn wasm_wasm_module_load() { | |
fn wasm_module_load_existing_nonexisting() { |
@dpfens everything looks great. We just need to choose a naming convention (I pointed out to some examples). I guess there are three questions:
@ereslibre @Angelmmiguel @assambar any opinion? |
No, I think the test should be named in the best way it describes what it tests, and I'd say a mandatory
I think it's good to have some structure. I like to have descriptive test names, but I would also not force for all tests to follow the same convention, only those that are very related to each other. In general I think it's fine to be descriptive to what the test is doing, and also meaningful with the code under test, so although structure is good sometimes, I would not enforce this. In my opinion unit tests should be very straightforward and just with a quick look at its body it should be pretty obvious what it's doing.
I am fine with |
Merged! |
To address #63, adds integration tests for remaining functions in
c_api.rs
toc_api.rs
file, and adds test forWasmModule::load_from_file
.