Added test for scan directory feature and updated readme.

This commit is contained in:
Tyler Sommer
2016-04-12 09:23:05 -06:00
parent 89978e2427
commit 0f3a4b7b8f
5 changed files with 110 additions and 37 deletions

View File

@ -4,23 +4,24 @@ import (
"testing"
"flag"
"go/build"
"io/ioutil"
"os"
"os/exec"
"path/filepath"
"go/build"
)
var javaTest = flag.String("javatest", ".*", "Run only java tests matching the regular expression")
func TestJavaBind(t *testing.T) {
verbose = testing.Verbose()
tmpDir, err := ioutil.TempDir("", "gojavatest")
if err != nil {
t.Fatal(err)
}
jar := filepath.Join(tmpDir, "gojavatest.jar")
if err := bindToJar(jar,
"",
"testdata",
"github.com/sridharv/gomobile-java/bind/testpkg",
"github.com/sridharv/gomobile-java/bind/testpkg/secondpkg",
"github.com/sridharv/gomobile-java/bind/testpkg/simplepkg",