Exports wasm.ValueType and makes Functions interfaces for signature verification (#284)
This moves code for `ValueType` constants public, so that we can centralize discussion on how values are encoded. We'll need this when re-introducing a Globals API. To keep complexity down in consideration that there are only 4 types, I copied the constants into the internalwasm package. This reduces the import complexity otherwise would have caused. Signed-off-by: Adrian Cole <adrian@tetrate.io> Co-authored-by: Takaya Saeki <takaya@tetrate.io>
This commit is contained in:
@@ -214,7 +214,7 @@ func TestFunction_Context(t *testing.T) {
|
||||
require.NoError(t, err)
|
||||
|
||||
// This fails if the function wasn't invoked, or had an unexpected context.
|
||||
results, err := exports.Function(functionName)(tc.ctx)
|
||||
results, err := exports.Function(functionName).Call(tc.ctx)
|
||||
require.NoError(t, err)
|
||||
require.Equal(t, expectedResult, results[0])
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user