github.com/tetratelabs/wazero@v1.7.3-0.20240513003603-48f702e154b5/internal/platform/platform_test.go (about)

     1  package platform
     2  
     3  import (
     4  	"runtime"
     5  	"testing"
     6  
     7  	"github.com/tetratelabs/wazero/internal/testing/require"
     8  )
     9  
    10  func Test_archRequirementsVerified(t *testing.T) {
    11  	switch runtime.GOARCH {
    12  	case "arm64":
    13  		require.True(t, archRequirementsVerified)
    14  	case "amd64":
    15  		// TODO: once we find a way to test no SSE4 platform, use build tag and choose the correct assertion.
    16  		// For now, we assume that all the amd64 machine we are testing are with SSE 4 to avoid
    17  		// accidentally turn off compiler on the modern amd64 platform.
    18  		require.True(t, archRequirementsVerified)
    19  	default:
    20  		require.False(t, archRequirementsVerified)
    21  	}
    22  }