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: Drop as_uint32() #691

Merged
merged 1 commit into from
Jan 20, 2021
Merged

test: Drop as_uint32() #691

merged 1 commit into from
Jan 20, 2021

Conversation

chfast
Copy link
Collaborator

@chfast chfast commented Jan 13, 2021

Depends on #517.

@codecov
Copy link

codecov bot commented Jan 13, 2021

Codecov Report

Merging #691 (652b7dd) into master (470bd08) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #691      +/-   ##
==========================================
- Coverage   99.30%   99.30%   -0.01%     
==========================================
  Files          72       72              
  Lines       10304    10300       -4     
==========================================
- Hits        10232    10228       -4     
  Misses         72       72              
Flag Coverage Δ
spectests 91.49% <ø> (ø)
unittests 99.30% <100.00%> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
test/utils/asserts.hpp 97.05% <ø> (-0.17%) ⬇️
test/unittests/api_test.cpp 100.00% <100.00%> (ø)
test/unittests/execute_call_test.cpp 100.00% <100.00%> (ø)
test/unittests/execute_test.cpp 100.00% <100.00%> (ø)
test/unittests/instantiate_test.cpp 100.00% <100.00%> (ø)
test/unittests/parser_test.cpp 100.00% <100.00%> (ø)

@@ -433,12 +433,10 @@ TEST(execute_call, imported_functions_call_indirect)
ASSERT_EQ(module->codesec.size(), 2);

constexpr auto sqr = [](Instance&, const Value* args, int) {
const auto x = as_uint32(args[0]);
return Value{uint64_t{x} * uint64_t{x}};
return Value{uint64_t{(args[0].i32)} * uint64_t{(args[0].i32)}};
Copy link
Member

Choose a reason for hiding this comment

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

Why are the extra parentheses needed?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

automatic refactoring... There is "inline variable" command in CLion which placed x in both places where it was used.

@chfast chfast force-pushed the value_i32 branch 2 times, most recently from 8957aab to 0fd8f0d Compare January 20, 2021 11:35
Base automatically changed from value_i32 to master January 20, 2021 12:41
@chfast chfast merged commit 28d4a68 into master Jan 20, 2021
@chfast chfast deleted the drop_as_uint32 branch January 20, 2021 15:51
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.

2 participants