Skip to content

Commit 7db50ea

Browse files
authored
Correctly use Linker.DefineFunction() for the LinkerFunctionTests. (#167)
This is a follow-up to PR #161.
1 parent b709269 commit 7db50ea

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

tests/LinkerFunctionsTests.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,19 +31,19 @@ public LinkerFunctionTests(LinkerFunctionsFixture fixture)
3131
caller.GetMemory("mem").ReadString(address, length).Should().Be("Hello World");
3232
});
3333

34-
Linker.Define("env", "return_i32", Function.FromCallback(Store, GetBoundFuncIntDelegate()));
34+
Linker.DefineFunction("env", "return_i32", GetBoundFuncIntDelegate());
3535

36-
Linker.Define("env", "return_15_values", Function.FromCallback(Store, () =>
36+
Linker.DefineFunction("env", "return_15_values", () =>
3737
{
3838
return (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15);
39-
}));
39+
});
4040

41-
Linker.Define("env", "accept_15_values", Function.FromCallback(Store,
41+
Linker.DefineFunction("env", "accept_15_values",
4242
(int i1, int i2, int i3, int i4, int i5, int i6, int i7, int i8, int i9, int i10, int i11, int i12, int i13, int i14, int i15) =>
4343
{
4444
(i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15)
4545
.Should().Be((1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15));
46-
}));
46+
});
4747

4848
Func<int> GetBoundFuncIntDelegate()
4949
{

0 commit comments

Comments
 (0)