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

test: Empty memory support #732

Merged
merged 3 commits into from
Feb 10, 2021
Merged

test: Empty memory support #732

merged 3 commits into from
Feb 10, 2021

Conversation

gumb0
Copy link
Collaborator

@gumb0 gumb0 commented Feb 9, 2021

No description provided.

@codecov
Copy link

codecov bot commented Feb 9, 2021

Codecov Report

Merging #732 (a1bdb83) into master (e50875f) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #732   +/-   ##
=======================================
  Coverage   99.34%   99.34%           
=======================================
  Files          73       73           
  Lines       11142    11164   +22     
=======================================
+ Hits        11069    11091   +22     
  Misses         73       73           
Flag Coverage Δ
rust 99.79% <ø> (ø)
spectests 90.84% <ø> (ø)
unittests 99.32% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
test/unittests/capi_test.cpp 99.87% <100.00%> (+<0.01%) ⬆️
test/unittests/instantiate_test.cpp 100.00% <100.00%> (ø)

@gumb0 gumb0 marked this pull request as ready for review February 9, 2021 15:55
/* wat2wasm
(memory 0)
*/
const auto wasm_memory_empty = from_hex("0061736d010000000503010000");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this duplicated in two test cases?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One test here checks module inspection function fizzy_module_has_memory

The test below checks instance memory access functions.

@gumb0 gumb0 requested review from chfast and axic February 9, 2021 17:14
@@ -450,6 +450,8 @@ const FizzyModule* fizzy_get_instance_module(FizzyInstance* instance);
/// @return Pointer to memory data or NULL in case instance doesn't have any memory.
///
/// @note Function returns pointer to memory regardless of whether memory is exported or not.
/// @note For instances of the modules defined with memory of size 0 the returned pointers is not
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// @note For instances of the modules defined with memory of size 0 the returned pointers is not
/// @note For instances of the modules defined with memory of size 0 the returned pointers are not

@gumb0 gumb0 merged commit c89ba77 into master Feb 10, 2021
@gumb0 gumb0 deleted the empty-memory-test branch February 10, 2021 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants