-
Notifications
You must be signed in to change notification settings - Fork 34
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
Type hardening in tests #687
Conversation
@@ -44,10 +44,10 @@ TEST(api, execution_result_void) | |||
|
|||
TEST(api, execution_result_value) | |||
{ | |||
const ExecutionResult result = Value{1234}; | |||
const ExecutionResult result = Value{1234_u32}; |
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.
If this i32 now, shouldn't there be another test for i64/f32/f64 (pick one or more?)?
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.
Not sure what this test is about. Seems to testing implicit Value -> ExecutionResult conversion.
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.
@gumb0 ?
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.
Yeah this tests ExecutionResult
constructor taking Value
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.
Yeah this tests
ExecutionResult
constructor takingValue
Right, I guess implicit one, because there's also a test for explicit constuction below.
@@ -510,8 +510,7 @@ TEST(execute_numeric, i64_extend_i32_u_2) | |||
"0061736d0100000001060160017f017e030201000a1201100042effdb6f5fdddefd65e1a2000ad0b"); | |||
|
|||
auto instance = instantiate(parse(wasm)); | |||
const auto r = execute(*instance, 0, {0xff000000}); | |||
EXPECT_THAT(r, Result(uint64_t{0x00000000ff000000})); | |||
EXPECT_THAT(execute(*instance, 0, {0xff000000}), Result(0x00000000ff000000_u64)); |
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.
Is this the last such instance or why pick on this one?
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 last case, at least in files using _u64
.
Codecov Report
@@ Coverage Diff @@
## master #687 +/- ##
=======================================
Coverage 99.31% 99.31%
=======================================
Files 72 72
Lines 10148 10148
=======================================
Hits 10078 10078
Misses 70 70
Flags with carried forward coverage won't be shown. Click here to find out more.
|
else | ||
{ | ||
if (result_listener->IsInterested()) | ||
*result_listener << "unsupported type"; |
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.
Do we want a test for this?
033b47f
to
1042781
Compare
No description provided.