github.com/wasilibs/wazerox@v0.0.0-20240124024944-4923be63ab5f/internal/testing/binaryencoding/element_test.go (about)

     1  package binaryencoding
     2  
     3  import (
     4  	"bytes"
     5  	"testing"
     6  
     7  	"github.com/wasilibs/wazerox/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  }