Documentation ¶
Overview ¶
Package testpkg contains bound functions for testing the cgo-JNI interface. This is used in tests of golang.org/x/mobile/bind/java.
Index ¶
- Constants
- Variables
- func Add(x, y int) int
- func AppendHello(s string) string
- func AppendToString(str string, someBytes []byte) []byte
- func BytesAppend(a []byte, b []byte) []byte
- func CallCDupper(d ConcreteDupper) bool
- func CallE(i I) error
- func CallF(i I)
- func CallIDupper(d InterfaceDupper) bool
- func CallIError(i I2, triggerError bool) error
- func CallIStringError(i I2, s string) (string, error)
- func CallImportedI(i secondpkg.I)
- func CallSSum(s *S2) float64
- func CallV(i I) int
- func CallVE(i I) (int, error)
- func CallWithCallback(gcb GoCallback)
- func CallWithNull(_null NullTest, nuller NullTest) bool
- func CollectS2(want, timeoutSec int) int
- func Err(s string) error
- func GC()
- func GarbageCollect()
- func GoroutineCallback(r Receiver)
- func Hello(r Receiver, name string)
- func Hi()
- func Int(x int32)
- func Keep(i I)
- func Multiply(idx int32, val int32) int64
- func Negate(x bool) bool
- func NewImportedI() secondpkg.I
- func NewImportedS() *secondpkg.S
- func NewSimpleS() *simplepkg.S
- func NumSCollected() int
- func PassByteArray(b B)
- func ReadAsset() string
- func ReadIntoByteArray(s []byte) (int, error)
- func RegisterI(idx int32, i I2)
- func ReturnsError(b bool) (string, error)
- func StrDup(s string) string
- func UnboundI(_ unboundpkg.I)
- func UnboundS(_ *unboundpkg.S)
- func UnnamedParams(_, _ int, p0 string) int
- func UnregisterI(idx int32)
- func WithImportedI(i secondpkg.I) secondpkg.I
- func WithImportedS(s *secondpkg.S) *secondpkg.S
- type AnSer
- type B
- type Concrete
- type ConcreteDupper
- type GoCallback
- type I
- type I2
- type ImportedFields
- type ImportedI
- type Interface
- type InterfaceDupper
- type Issue14168
- type Node
- type NullFieldStruct
- type NullTest
- type Nummer
- type Receiver
- type S
- type S2
Constants ¶
View Source
const ( AString = "a string" AnInt = 7 ABool = true AFloat = 0.12345 MinInt32 int32 = math.MinInt32 MaxInt32 int32 = math.MaxInt32 MinInt64 = math.MinInt64 MaxInt64 = math.MaxInt64 SmallestNonzeroFloat64 = math.SmallestNonzeroFloat64 MaxFloat64 = math.MaxFloat64 SmallestNonzeroFloat32 float32 = math.SmallestNonzeroFloat64 MaxFloat32 float32 = math.MaxFloat32 Log2E = math.Log2E )
Variables ¶
View Source
var ( StringVar = "a string var" IntVar = 77 StructVar = &S{name: "a struct var"} InterfaceVar I InterfaceVar2 I2 NodeVar = &Node{V: "a struct var"} )
View Source
var ( ImportedVarI secondpkg.I = NewImportedI() ImportedVarS *secondpkg.S = NewImportedS() )
Functions ¶
func AppendHello ¶
func AppendToString ¶
func BytesAppend ¶
func CallCDupper ¶
func CallCDupper(d ConcreteDupper) bool
func CallIDupper ¶
func CallIDupper(d InterfaceDupper) bool
func CallIError ¶
func CallImportedI ¶
func CallWithCallback ¶
func CallWithCallback(gcb GoCallback)
func CallWithNull ¶
func GarbageCollect ¶
func GarbageCollect()
func GoroutineCallback ¶
func GoroutineCallback(r Receiver)
func NewImportedI ¶
func NewImportedS ¶
func NewSimpleS ¶
func NumSCollected ¶
func NumSCollected() int
func PassByteArray ¶
func PassByteArray(b B)
func ReadIntoByteArray ¶
func ReturnsError ¶
func UnboundI ¶
func UnboundI(_ unboundpkg.I)
func UnboundS ¶
func UnboundS(_ *unboundpkg.S)
func UnnamedParams ¶
func UnregisterI ¶
func UnregisterI(idx int32)
Types ¶
type ConcreteDupper ¶
type GoCallback ¶
type GoCallback interface {
VarUpdate()
}
type I ¶
type I interface { F() E() error V() int VE() (int, error) I() I S() *S StoString(seq *S) string String() string }
func NewNullInterface ¶
func NewNullInterface() I
type I2 ¶
type ImportedFields ¶
func NewImportedFields ¶
func NewImportedFields() *ImportedFields
type InterfaceDupper ¶
type Issue14168 ¶
type Issue14168 interface {
F(seq int32)
}
type NullFieldStruct ¶
type NullFieldStruct struct {
F *S
}
Issue #13033
func NewNullFieldStruct ¶
func NewNullFieldStruct() *NullFieldStruct
type S ¶
type S struct {
// contains filtered or unexported fields
}
func NewNullStruct ¶
func NewNullStruct() *S
Directories ¶
Path | Synopsis |
---|---|
Package secondpkg is imported by bind tests that verify that a bound package can reference another bound package.
|
Package secondpkg is imported by bind tests that verify that a bound package can reference another bound package. |
Package simplepkg is imported from testpkg and tests two corner cases.
|
Package simplepkg is imported from testpkg and tests two corner cases. |
Package simplepkg is imported from testpkg and tests that references to other, unbound packages, are ignored.
|
Package simplepkg is imported from testpkg and tests that references to other, unbound packages, are ignored. |
Click to show internal directories.
Click to hide internal directories.