diff --git a/bind/java/seq_test.go b/bind/java/seq_test.go index 6d0fd6f..3e82a56 100644 --- a/bind/java/seq_test.go +++ b/bind/java/seq_test.go @@ -23,21 +23,21 @@ func TestClasses(t *testing.T) { t.Skipf("java importer is not available") } runTest(t, []string{ - "golang.org/x/mobile/bind/testpkg/javapkg", + "golang.org/x/mobile/bind/testdata/testpkg/javapkg", }, "", "ClassesTest") } func TestCustomPkg(t *testing.T) { runTest(t, []string{ - "golang.org/x/mobile/bind/testpkg", + "golang.org/x/mobile/bind/testdata/testpkg", }, "org.golang.custompkg", "CustomPkgTest") } func TestJavaSeqTest(t *testing.T) { runTest(t, []string{ - "golang.org/x/mobile/bind/testpkg", - "golang.org/x/mobile/bind/testpkg/secondpkg", - "golang.org/x/mobile/bind/testpkg/simplepkg", + "golang.org/x/mobile/bind/testdata/testpkg", + "golang.org/x/mobile/bind/testdata/testpkg/secondpkg", + "golang.org/x/mobile/bind/testdata/testpkg/simplepkg", }, "", "SeqTest") } diff --git a/bind/objc/seq_test.go b/bind/objc/seq_test.go index 4dfa334..c3f86f4 100644 --- a/bind/objc/seq_test.go +++ b/bind/objc/seq_test.go @@ -39,9 +39,9 @@ var destination = flag.String("device", "platform=iOS Simulator,name=iPhone 6s P // This requires the xcode command lines tools. func TestObjcSeqTest(t *testing.T) { runTest(t, []string{ - "golang.org/x/mobile/bind/testpkg", - "golang.org/x/mobile/bind/testpkg/secondpkg", - "golang.org/x/mobile/bind/testpkg/simplepkg", + "golang.org/x/mobile/bind/testdata/testpkg", + "golang.org/x/mobile/bind/testdata/testpkg/secondpkg", + "golang.org/x/mobile/bind/testdata/testpkg/simplepkg", }, "xcodetest", "SeqTest.m", false) } @@ -57,7 +57,7 @@ func TestObjcSeqBench(t *testing.T) { // TestObjcSeqWrappers runs ObjC test SeqWrappers.m. // This requires the xcode command lines tools. func TestObjcSeqWrappers(t *testing.T) { - runTest(t, []string{"golang.org/x/mobile/bind/testpkg/objcpkg"}, "xcodewrappers", "SeqWrappers.m", false) + runTest(t, []string{"golang.org/x/mobile/bind/testdata/testpkg/objcpkg"}, "xcodewrappers", "SeqWrappers.m", false) } func runTest(t *testing.T, pkgNames []string, project, testfile string, dumpOutput bool) { diff --git a/bind/testpkg/assets/hello.txt b/bind/testdata/testpkg/assets/hello.txt similarity index 100% rename from bind/testpkg/assets/hello.txt rename to bind/testdata/testpkg/assets/hello.txt diff --git a/bind/testpkg/javapkg/classes.go b/bind/testdata/testpkg/javapkg/classes.go similarity index 99% rename from bind/testpkg/javapkg/classes.go rename to bind/testdata/testpkg/javapkg/classes.go index 2cdcdd7..3f95c48 100644 --- a/bind/testpkg/javapkg/classes.go +++ b/bind/testdata/testpkg/javapkg/classes.go @@ -2,8 +2,6 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build android - package javapkg import ( diff --git a/bind/testpkg/javapkg/java.go b/bind/testdata/testpkg/javapkg/java.go similarity index 98% rename from bind/testpkg/javapkg/java.go rename to bind/testdata/testpkg/javapkg/java.go index cd7367f..948f13a 100644 --- a/bind/testpkg/javapkg/java.go +++ b/bind/testdata/testpkg/javapkg/java.go @@ -2,8 +2,6 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build android - package javapkg import ( diff --git a/bind/testpkg/objcpkg/classes.go b/bind/testdata/testpkg/objcpkg/classes.go similarity index 98% rename from bind/testpkg/objcpkg/classes.go rename to bind/testdata/testpkg/objcpkg/classes.go index b25b207..608dd97 100644 --- a/bind/testpkg/objcpkg/classes.go +++ b/bind/testdata/testpkg/objcpkg/classes.go @@ -2,8 +2,6 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build ios - package objcpkg import ( diff --git a/bind/testpkg/objcpkg/objc.go b/bind/testdata/testpkg/objcpkg/objc.go similarity index 98% rename from bind/testpkg/objcpkg/objc.go rename to bind/testdata/testpkg/objcpkg/objc.go index ab953cf..4c1b07f 100644 --- a/bind/testpkg/objcpkg/objc.go +++ b/bind/testdata/testpkg/objcpkg/objc.go @@ -2,8 +2,6 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build ios - package objcpkg import ( diff --git a/bind/testpkg/secondpkg/secondpkg.go b/bind/testdata/testpkg/secondpkg/secondpkg.go similarity index 100% rename from bind/testpkg/secondpkg/secondpkg.go rename to bind/testdata/testpkg/secondpkg/secondpkg.go diff --git a/bind/testpkg/simplepkg/simplepkg.go b/bind/testdata/testpkg/simplepkg/simplepkg.go similarity index 100% rename from bind/testpkg/simplepkg/simplepkg.go rename to bind/testdata/testpkg/simplepkg/simplepkg.go diff --git a/bind/testpkg/tagged.go b/bind/testdata/testpkg/tagged.go similarity index 100% rename from bind/testpkg/tagged.go rename to bind/testdata/testpkg/tagged.go diff --git a/bind/testpkg/testpkg.go b/bind/testdata/testpkg/testpkg.go similarity index 98% rename from bind/testpkg/testpkg.go rename to bind/testdata/testpkg/testpkg.go index 8ebbcd3..e4ab40a 100644 --- a/bind/testpkg/testpkg.go +++ b/bind/testdata/testpkg/testpkg.go @@ -2,8 +2,6 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build darwin linux - // Package testpkg contains bound functions for testing the cgo-JNI interface. // This is used in tests of golang.org/x/mobile/bind/java. package testpkg @@ -23,9 +21,9 @@ import ( "golang.org/x/mobile/asset" - "golang.org/x/mobile/bind/testpkg/secondpkg" - "golang.org/x/mobile/bind/testpkg/simplepkg" - "golang.org/x/mobile/bind/testpkg/unboundpkg" + "golang.org/x/mobile/bind/testdata/testpkg/secondpkg" + "golang.org/x/mobile/bind/testdata/testpkg/simplepkg" + "golang.org/x/mobile/bind/testdata/testpkg/unboundpkg" ) const ( diff --git a/bind/testpkg/unboundpkg/unboundpkg.go b/bind/testdata/testpkg/unboundpkg/unboundpkg.go similarity index 100% rename from bind/testpkg/unboundpkg/unboundpkg.go rename to bind/testdata/testpkg/unboundpkg/unboundpkg.go diff --git a/cmd/gobind/gobind_test.go b/cmd/gobind/gobind_test.go index 7b771ab..a856da8 100644 --- a/cmd/gobind/gobind_test.go +++ b/cmd/gobind/gobind_test.go @@ -17,11 +17,11 @@ var tests = []struct { pkg string goos string }{ - {"ObjC-Testpkg", "objc", "golang.org/x/mobile/bind/testpkg", ""}, - {"Java-Testpkg", "java", "golang.org/x/mobile/bind/testpkg", ""}, - {"Go-Testpkg", "go", "golang.org/x/mobile/bind/testpkg", ""}, - {"Java-Javapkg", "java", "golang.org/x/mobile/bind/testpkg/javapkg", "android"}, - {"Go-Javapkg", "go", "golang.org/x/mobile/bind/testpkg/javapkg", "android"}, + {"ObjC-Testpkg", "objc", "golang.org/x/mobile/bind/testdata/testpkg", ""}, + {"Java-Testpkg", "java", "golang.org/x/mobile/bind/testdata/testpkg", ""}, + {"Go-Testpkg", "go", "golang.org/x/mobile/bind/testdata/testpkg", ""}, + {"Java-Javapkg", "java", "golang.org/x/mobile/bind/testdata/testpkg/javapkg", "android"}, + {"Go-Javapkg", "go", "golang.org/x/mobile/bind/testdata/testpkg/javapkg", "android"}, } func installGobind() error {