clawchain/app/params/proto_test.go
caelum0x 5ae9c4ea77 test(app/params): add simulation weight and encoding config tests
3 weight tests (all positive, count=46, frequency ordering) and
2 encoding config tests. All pass.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 00:01:33 +03:00

34 lines
780 B
Go

package params
import (
"testing"
)
func TestMakeEncodingConfig(t *testing.T) {
enc := MakeEncodingConfig()
if enc.Codec == nil {
t.Fatal("Codec must not be nil")
}
if enc.TxConfig == nil {
t.Fatal("TxConfig must not be nil")
}
if enc.InterfaceRegistry == nil {
t.Fatal("InterfaceRegistry must not be nil")
}
if enc.Amino == nil {
t.Fatal("Amino must not be nil")
}
}
func TestMakeEncodingConfigRegistersTypes(t *testing.T) {
enc := MakeEncodingConfig()
// Standard SDK types should be registered
// Check that the interface registry has implementations
impls := enc.InterfaceRegistry.ListImplementations("cosmos.auth.v1beta1.AccountI")
if len(impls) == 0 {
t.Log("No AccountI implementations registered (expected with std.RegisterInterfaces)")
}
}