Currently there is a Go test package for each platform, iOS and Android. This CL merges them into a single, shared package. Apart from the reduced code duplication, the merger stops the tests diverging further. Most importantly, one shared package clarifies that the intent of gobind is that the same Go package can be reused across platforms. This CL only merges the obvious test duplicates. The rest have been copied from the ObjC package into the Android test under different names. While we're here, demote the long string test to the basictypes bind test; the test never had a runtime part. Change-Id: I7838b16999968fae7b012016a5b5f6bb80f94023 Reviewed-on: https://go-review.googlesource.com/20300 Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
26 lines
1.1 KiB
Go
26 lines
1.1 KiB
Go
// Copyright 2014 The Go Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
package basictypes
|
|
|
|
const (
|
|
AString = "a string"
|
|
AnInt = 7
|
|
AnInt2 = 1<<63 - 1
|
|
AFloat = 0.2015
|
|
ARune = rune(32)
|
|
ABool = true
|
|
ALongString = "LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString"
|
|
)
|
|
|
|
func Ints(x int8, y int16, z int32, t int64, u int) {}
|
|
|
|
func Error() error { return nil }
|
|
|
|
func ErrorPair() (int, error) { return 0, nil }
|
|
|
|
func ByteArrays(x []byte) []byte { return nil }
|
|
|
|
func Bool(bool) bool { return true }
|