| 269 | } |
| 270 | |
| 271 | func TestBytes(t *testing.T) { |
| 272 | // t.Parallel() |
| 273 | path := "_examples/gobytes" |
| 274 | testPkg(t, pkg{ |
| 275 | path: path, |
| 276 | lang: features[path], |
| 277 | cmd: "build", |
| 278 | extras: nil, |
| 279 | want: []byte(`Python bytes: b'\x00\x01\x02\x03' |
| 280 | Go slice: go.Slice_byte len: 10 handle: 1 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] |
| 281 | gobytes.HashBytes from Go bytes: gobytes.Array_4_byte len: 4 handle: 2 [12, 13, 81, 81] |
| 282 | Python bytes to Go: go.Slice_byte len: 4 handle: 3 [0, 1, 2, 3] |
| 283 | Go bytes to Python: b'\x03\x04\x05' |
| 284 | OK |
| 285 | `), |
| 286 | }) |
| 287 | |
| 288 | } |
| 289 | |
| 290 | func TestBindFuncs(t *testing.T) { |
| 291 | // t.Parallel() |