Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(279)

Unified Diff: third_party/go/src/golang.org/x/mobile/bind/java/testpkg/testpkg.go

Issue 1275153002: Remove third_party/golang.org/x/mobile as it is no longer used with Go 1.5. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Remove golang.org/x/mobile Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/go/src/golang.org/x/mobile/bind/java/testpkg/testpkg.go
diff --git a/third_party/go/src/golang.org/x/mobile/bind/java/testpkg/testpkg.go b/third_party/go/src/golang.org/x/mobile/bind/java/testpkg/testpkg.go
deleted file mode 100644
index c4bde1b3bb10ff9dde263341ce8015750732ae62..0000000000000000000000000000000000000000
--- a/third_party/go/src/golang.org/x/mobile/bind/java/testpkg/testpkg.go
+++ /dev/null
@@ -1,116 +0,0 @@
-// Package testpkg contains bound functions for testing the cgo-JNI interface.
-package testpkg
-
-//go:generate gobind -lang=go -output=go_testpkg/go_testpkg.go .
-//go:generate gobind -lang=java -output=Testpkg.java .
-import (
- "errors"
- "fmt"
- "runtime"
- "time"
-)
-
-type I interface {
- F()
-
- E() error
- V() int
- VE() (int, error)
- I() I
- S() *S
-
- String() string
-}
-
-func CallF(i I) {
- i.F()
-}
-
-func CallE(i I) error {
- return i.E()
-}
-
-func CallV(i I) int {
- return i.V()
-}
-
-func CallVE(i I) (int, error) {
- return i.VE()
-}
-
-func CallI(i I) I {
- return i
-}
-
-func CallS(i I) *S {
- return &S{}
-}
-
-var keep []I
-
-func Keep(i I) {
- keep = append(keep, i)
-}
-
-var numSCollected int
-
-type S struct {
- // *S already has a finalizer, so we need another object
- // to count successful collections.
- innerObj *int
-
- name string
-}
-
-func (s *S) F() {
- fmt.Printf("called F on *S{%s}\n", s.name)
-}
-
-func (s *S) String() string {
- return s.name
-}
-
-func finalizeInner(*int) {
- numSCollected++
-}
-
-func New() *S {
- s := &S{innerObj: new(int), name: "new"}
- runtime.SetFinalizer(s.innerObj, finalizeInner)
- return s
-}
-
-func GC() {
- runtime.GC()
- time.Sleep(10 * time.Millisecond)
- runtime.GC()
-}
-
-func Add(x, y int) int {
- return x + y
-}
-
-func NumSCollected() int {
- return numSCollected
-}
-
-func StrDup(s string) string {
- return s
-}
-
-func Err(s string) error {
- if s != "" {
- return errors.New(s)
- }
- return nil
-}
-
-func BytesAppend(a []byte, b []byte) []byte {
- return append(a, b...)
-}
-
-func AppendToString(str string, someBytes []byte) []byte {
- a := []byte(str)
- fmt.Printf("str=%q (len=%d), someBytes=%v (len=%d)\n", str, len(str), someBytes, len(someBytes))
- return append(a, someBytes...)
-}

Powered by Google App Engine
This is Rietveld 408576698