github.com/jiasir/docker@v1.3.3-0.20170609024000-252e610103e7/pkg/platform/utsname_uint8_test.go (about)

     1  // +build linux,arm linux,ppc64 linux,ppc64le s390x
     2  
     3  package platform
     4  
     5  import (
     6  	"testing"
     7  
     8  	"github.com/stretchr/testify/assert"
     9  )
    10  
    11  func TestTestCharToString(t *testing.T) {
    12  	machineInBytes := [65]uint8{120, 56, 54, 95, 54, 52}
    13  	machineInString := charsToString(machineInBytes)
    14  	assert.NotNil(t, machineInString, "Unable to convert char into string.")
    15  	assert.Equal(t, string("x86_64"), machineInString, "Parsed machine code not equal.")
    16  }