doc: params/config.libevm_test.go comments and improved readability

This commit is contained in:
Arran Schlosberg 2024-08-23 15:33:02 +01:00
parent de201479a2
commit 8b42942216
No known key found for this signature in database
GPG key ID: 8A30F7E4344B4EF3

View file

@ -10,6 +10,9 @@ import (
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
) )
// testOnlyClearRegisteredExtras SHOULD be called before every call to
// [RegisterExtras] and then defer-called afterwards. This is a workaround for
// the single-call limitation on [RegisterExtras].
func testOnlyClearRegisteredExtras() { func testOnlyClearRegisteredExtras() {
registeredExtras = nil registeredExtras = nil
} }
@ -18,10 +21,10 @@ type rawJSON struct {
json.RawMessage json.RawMessage
} }
var ( var _ interface {
_ json.Unmarshaler = (*rawJSON)(nil) json.Marshaler
_ json.Marshaler = (*rawJSON)(nil) json.Unmarshaler
) } = (*rawJSON)(nil)
func TestRegisterExtras(t *testing.T) { func TestRegisterExtras(t *testing.T) {
type ( type (