github.com/jiasir/docker@v1.3.3-0.20170609024000-252e610103e7/pkg/platform/utsname_int8_test.go (about) 1 // +build linux,386 linux,amd64 linux,arm64 2 3 package platform 4 5 import ( 6 "testing" 7 8 "github.com/stretchr/testify/assert" 9 ) 10 11 func TestCharToString(t *testing.T) { 12 machineInBytes := [65]int8{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 }