1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/pkg/platform/utsname_uint8_test.go
Christopher Jones 069fdc8a08
[project] change syscall to /x/sys/unix|windows
Changes most references of syscall to golang.org/x/sys/
Ones aren't changes include, Errno, Signal and SysProcAttr
as they haven't been implemented in /x/sys/.

Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com>

[s390x] switch utsname from unsigned to signed

per 33267e036f
char in s390x in the /x/sys/unix package is now signed, so
change the buildtags

Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com>
2017-07-11 08:00:32 -04:00

16 lines
435 B
Go

// +build linux,arm linux,ppc64 linux,ppc64le
package platform
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestTestCharToString(t *testing.T) {
machineInBytes := [65]uint8{120, 56, 54, 95, 54, 52}
machineInString := charsToString(machineInBytes)
assert.NotNil(t, machineInString, "Unable to convert char into string.")
assert.Equal(t, string("x86_64"), machineInString, "Parsed machine code not equal.")
}