| 288 | } |
| 289 | |
| 290 | func TestBindFuncs(t *testing.T) { |
| 291 | // t.Parallel() |
| 292 | path := "_examples/funcs" |
| 293 | testPkg(t, pkg{ |
| 294 | path: path, |
| 295 | lang: features[path], |
| 296 | cmd: "build", |
| 297 | extras: nil, |
| 298 | want: []byte(`got return value: true |
| 299 | got nil |
| 300 | ofs FieldI: 42 FieldS: str field |
| 301 | fs.CallBack(22, cbfun)... |
| 302 | in python cbfun: FieldI: 42 FieldS: str field ival: 22 sval: str field |
| 303 | fs.CallBackIf(22, cbfunif)... |
| 304 | in python cbfunif: FieldI: 42 FieldS: str field ival: 22 ifval: str field |
| 305 | fs.CallBackRval(22, cbfunrval)... |
| 306 | in python cbfunrval: FieldI: 42 FieldS: str field ival: 22 ifval: str field |
| 307 | fs.CallBack(32, cls.ClassFun)... |
| 308 | in python class fun: FieldI: 42 FieldS: str field ival: 32 sval: str field |
| 309 | cls.CallSelf... |
| 310 | in python class fun: FieldI: 42 FieldS: str field ival: 77 sval: str field |
| 311 | fs.ObjArg with nil |
| 312 | fs.ObjArg with fs |
| 313 | OK |
| 314 | `), |
| 315 | }) |
| 316 | } |
| 317 | |
| 318 | func TestBindSimple(t *testing.T) { |
| 319 | // t.Parallel() |