Skip to content

Commit

Permalink
more
Browse files Browse the repository at this point in the history
Signed-off-by: Takeshi Yoneda <[email protected]>
  • Loading branch information
mathetake committed Feb 19, 2025
1 parent a134796 commit 78bca75
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions internal/integration_test/engine/adhoc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -581,10 +581,14 @@ func testHostFunctionNumericParameter(t *testing.T, r wazero.Runtime) {
results, err := importing.ExportedFunction("call_return_input").Call(testCtx, test.input)
require.NoError(t, err)
switch test.vt {
case i32, f32:
require.Equal(t, uint32(test.expected), uint32(results[0]))
case i64, f64:
case i32:
require.Equal(t, api.DecodeI32(test.expected), api.DecodeI32(results[0]))
case f32:
require.Equal(t, api.DecodeF32(test.expected), api.DecodeF32(results[0]))
case i64:
require.Equal(t, test.expected, results[0])
case f64:
require.Equal(t, api.DecodeF64(test.expected), api.DecodeF64(results[0]))
}
})
}
Expand Down

0 comments on commit 78bca75

Please sign in to comment.