github.com/benz9527/xboot@v0.0.0-20240504061247-c23f15593274/lib/kv/simd/pshufb_test.go (about)

     1  package main
     2  
     3  import (
     4  	"testing"
     5  
     6  	"github.com/stretchr/testify/require"
     7  )
     8  
     9  func TestPSHUFB(t *testing.T) {
    10  	var md [16]int8
    11  	hash := int8(0b01100110)
    12  	pshufb(&md, hash)
    13  	for i := 0; i < 16; i++ {
    14  		require.Equal(t, md[i], int8(0b01100110))
    15  	}
    16  }