compiler: allow to overload methods in manifest

Signed-off-by: Evgeniy Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
Evgeniy Stratonikov 2021-10-16 14:10:17 +03:00
parent 67eac3a27f
commit 7758378d28
8 changed files with 128 additions and 0 deletions

View file

@ -647,6 +647,22 @@ func TestCompileExamples(t *testing.T) {
"--config", path.Join(examplePath, info.Name(), cfgName),
}
e.Run(t, opts...)
if info.Name() == "storage" {
rawM, err := ioutil.ReadFile(manifestF)
require.NoError(t, err)
m := new(manifest.Manifest)
require.NoError(t, json.Unmarshal(rawM, m))
require.Nil(t, m.ABI.GetMethod("getDefault", 0))
require.NotNil(t, m.ABI.GetMethod("get", 0))
require.NotNil(t, m.ABI.GetMethod("get", 1))
require.Nil(t, m.ABI.GetMethod("putDefault", 1))
require.NotNil(t, m.ABI.GetMethod("put", 1))
require.NotNil(t, m.ABI.GetMethod("put", 2))
}
})
}