api: reverts the uint32->uint64 breaking change for 2.0 release (#2106)

Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
This commit is contained in:
Takeshi Yoneda
2024-03-02 13:05:10 +09:00
committed by GitHub
parent 0b0a23c28f
commit 712f9370a4
28 changed files with 135 additions and 136 deletions

View File

@@ -192,7 +192,7 @@ func TestModule_Memory(t *testing.T) {
name string
wasm []byte
expected bool
expectedLen uint64
expectedLen uint32
}{
{
name: "no memory",
@@ -226,7 +226,7 @@ func TestModule_Memory(t *testing.T) {
defs := module.ExportedMemoryDefinitions()
require.Equal(t, 1, len(defs))
def := defs["memory"]
require.Equal(t, tc.expectedLen>>16, uint64(def.Min()))
require.Equal(t, tc.expectedLen>>16, def.Min())
} else {
require.Nil(t, mem)
require.Zero(t, len(module.ExportedMemoryDefinitions()))