Jiri Simsa | 5293dcb | 2014-05-10 09:56:38 -0700 | [diff] [blame] | 1 | package test_base |
| 2 | |
| 3 | type Struct struct { |
| 4 | X,Y int32 |
| 5 | } |
| 6 | |
| 7 | type TypeTester interface { |
| 8 | // Methods to test support for generic types. |
Todd Wang | 383e88c | 2014-12-18 01:52:34 -0800 | [diff] [blame] | 9 | EchoBool(I1 bool) (O1 bool | error) |
| 10 | EchoFloat32(I1 float32) (O1 float32 | error) |
| 11 | EchoFloat64(I1 float64) (O1 float64 | error) |
| 12 | EchoInt32(I1 int32) (O1 int32 | error) |
| 13 | EchoInt64(I1 int64) (O1 int64 | error) |
| 14 | EchoString(I1 string) (O1 string | error) |
| 15 | EchoByte(I1 byte) (O1 byte | error) |
| 16 | EchoUInt32(I1 uint32) (O1 uint32 | error) |
| 17 | EchoUInt64(I1 uint64) (O1 uint64 | error) |
Jiri Simsa | 5293dcb | 2014-05-10 09:56:38 -0700 | [diff] [blame] | 18 | |
| 19 | // Methods to test support for composite types. |
Todd Wang | 383e88c | 2014-12-18 01:52:34 -0800 | [diff] [blame] | 20 | InputArray(I1 [2]byte) error |
| 21 | InputMap(I1 map[byte]byte) error |
| 22 | InputSlice(I1 []byte) error |
| 23 | InputStruct(I1 Struct) error |
| 24 | OutputArray() (O1 [2]byte | error) |
| 25 | OutputMap() (O1 map[byte]byte | error) |
| 26 | OutputSlice() (O1 []byte | error) |
| 27 | OutputStruct() (O1 Struct | error) |
Jiri Simsa | 5293dcb | 2014-05-10 09:56:38 -0700 | [diff] [blame] | 28 | |
| 29 | // Methods to test support for different number of arguments. |
| 30 | NoArguments() error |
Todd Wang | 383e88c | 2014-12-18 01:52:34 -0800 | [diff] [blame] | 31 | MultipleArguments(I1, I2 int32) (O1, O2 int32 | error) |
Jiri Simsa | 5293dcb | 2014-05-10 09:56:38 -0700 | [diff] [blame] | 32 | |
| 33 | // Methods to test support for streaming. |
| 34 | StreamingOutput(NumStreamItems int32, StreamItem bool) stream<_, bool> error |
| 35 | } |