github.com/sleungcy-sap/cli@v7.1.0+incompatible/util/generic/architecture_test.go (about) 1 package generic_test 2 3 import ( 4 . "code.cloudfoundry.org/cli/util/generic" 5 . "github.com/onsi/ginkgo" 6 . "github.com/onsi/ginkgo/extensions/table" 7 . "github.com/onsi/gomega" 8 ) 9 10 var _ = Describe("architecture", func() { 11 DescribeTable("GeneratePlatform", 12 func(runtimeGOOS string, runtimeGOARCH string, platform string) { 13 Expect(GeneratePlatform(runtimeGOOS, runtimeGOARCH)).To(Equal(platform)) 14 }, 15 16 Entry("linux64", "linux", "amd64", "linux64"), 17 Entry("linux32", "linux", "386", "linux32"), 18 Entry("win64", "windows", "amd64", "win64"), 19 Entry("win32", "windows", "386", "win32"), 20 Entry("osx", "darwin", "this is ignored", "osx"), 21 22 Entry("linux64", "linux", "arm64", ""), 23 Entry("linux32", "linux", "arm", ""), 24 Entry("win64", "windows", "arm64", ""), 25 Entry("win32", "windows", "arm", ""), 26 Entry("osx", "darwin", "amd64", "osx"), 27 ) 28 })