Fixed tests.

This commit is contained in:
Tyler Sommer
2016-04-11 11:06:04 -06:00
parent ba1a7e0845
commit 89978e2427

View File

@ -8,6 +8,7 @@ import (
"os" "os"
"os/exec" "os/exec"
"path/filepath" "path/filepath"
"go/build"
) )
var javaTest = flag.String("javatest", ".*", "Run only java tests matching the regular expression") var javaTest = flag.String("javatest", ".*", "Run only java tests matching the regular expression")
@ -19,6 +20,7 @@ func TestJavaBind(t *testing.T) {
} }
jar := filepath.Join(tmpDir, "gojavatest.jar") jar := filepath.Join(tmpDir, "gojavatest.jar")
if err := bindToJar(jar, if err := bindToJar(jar,
"",
"github.com/sridharv/gomobile-java/bind/testpkg", "github.com/sridharv/gomobile-java/bind/testpkg",
"github.com/sridharv/gomobile-java/bind/testpkg/secondpkg", "github.com/sridharv/gomobile-java/bind/testpkg/secondpkg",
"github.com/sridharv/gomobile-java/bind/testpkg/simplepkg", "github.com/sridharv/gomobile-java/bind/testpkg/simplepkg",
@ -28,7 +30,7 @@ func TestJavaBind(t *testing.T) {
toCopy := []filePair{ toCopy := []filePair{
{filepath.Join(tmpDir, "MoreAsserts.java"), "MoreAsserts.java"}, {filepath.Join(tmpDir, "MoreAsserts.java"), "MoreAsserts.java"},
{filepath.Join(tmpDir, "SeqTest.java"), "../gomobile-java/bind/java/SeqTest.java"}, {filepath.Join(tmpDir, "SeqTest.java"), filepath.Join(build.Default.GOPATH, "src/github.com/sridharv/gomobile-java/bind/java/SeqTest.java")},
} }
if err := copyFiles(toCopy); err != nil { if err := copyFiles(toCopy); err != nil {
t.Fatal(err) t.Fatal(err)