Files
docker-cli/components/engine/pkg/platform/utsname_int8_test.go
Raja Sami 421a16553e Increase the Coverage of pkg/platform
Signed-off-by: Raja Sami <raja.sami@tenpearls.com>
Upstream-commit: bdc87676bfee0f9a26fe12323dbe6875af783645
Component: engine
2017-05-31 13:26:40 +05:00

17 lines
428 B
Go

// +build linux,386 linux,amd64 linux,arm64
package platform
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestCharToString(t *testing.T) {
machineInBytes := [65]int8{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.")
}