Skip to content

Commit

Permalink
broken f
Browse files Browse the repository at this point in the history
Signed-off-by: Edoardo Vacchi <[email protected]>
  • Loading branch information
evacchi committed Aug 9, 2023
1 parent 1bd9a3c commit a4fe61b
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion imports/emscripten/emscripten_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,19 @@ func TestInstantiateForModule(t *testing.T) {
<--
<==
<--
`,
},
{
name: "broken func",
funcName: "blah_I_dont_exist_lol",
tableOffset: 18,
params: []uint64{1, 2, 4, 8},
expectedLog: `--> .calli32_i32i32i32i32_v(18,1,2,4,8)
==> env.invoke_viiii(index=18,a1=1,a2=2,a3=4,a4=8)
--> .i32i32i32i32_v(1,2,4,8)
<--
<==
<--
`,
},
}
Expand All @@ -507,7 +520,8 @@ func TestInstantiateForModule(t *testing.T) {
params := tc.params
params = append([]uint64{uint64(tc.tableOffset)}, params...)

results, err := mod.ExportedFunction(tc.funcName).Call(testCtx, params...)
f := mod.ExportedFunction(tc.funcName)
results, err := f.Call(testCtx, params...)
require.NoError(t, err)
require.Equal(t, tc.expectedResults, results)

Expand Down

0 comments on commit a4fe61b

Please sign in to comment.