20 lines
521 B
Go
Executable File
20 lines
521 B
Go
Executable File
package native
|
|
|
|
import (
|
|
"fmt"
|
|
"testing"
|
|
|
|
"git.marketally.com/tutus-one/tutus-chain/pkg/config"
|
|
"git.marketally.com/tutus-one/tutus-chain/pkg/core/native/nativenames"
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
func TestNativenamesIsValid(t *testing.T) {
|
|
contracts := NewDefaultContracts(config.ProtocolConfiguration{})
|
|
for _, c := range contracts {
|
|
require.True(t, nativenames.IsValid(c.Metadata().Name), fmt.Errorf("add %s to nativenames.IsValid(...)", c))
|
|
}
|
|
|
|
require.False(t, nativenames.IsValid("unknown"))
|
|
}
|