github.com/tetratelabs/wazero@v1.7.3-0.20240513003603-48f702e154b5/internal/testing/binaryencoding/element_test.go (about)

     1  package binaryencoding
     2  
     3  import (
     4  	"bytes"
     5  	"testing"
     6  
     7  	"github.com/tetratelabs/wazero/internal/testing/require"
     8  )
     9  
    10  func Test_ensureElementKindFuncRef(t *testing.T) {
    11  	require.NoError(t, ensureElementKindFuncRef(bytes.NewReader([]byte{0x0})))
    12  	require.Error(t, ensureElementKindFuncRef(bytes.NewReader([]byte{0x1})))
    13  }