| 516 | } |
| 517 | |
| 518 | public void testRoundtripEquality() { |
| 519 | I want = new AnI(); |
| 520 | assertTrue("java object passed through Go should not be wrapped", want == Testpkg.iDup(want)); |
| 521 | InterfaceDupper idup = new InterfaceDupper(){ |
| 522 | @Override public Interface iDup(Interface i) { |
| 523 | return i; |
| 524 | } |
| 525 | }; |
| 526 | assertTrue("Go interface passed through Java should not be wrapped", Testpkg.callIDupper(idup)); |
| 527 | ConcreteDupper cdup = new ConcreteDupper(){ |
| 528 | @Override public Concrete cDup(Concrete c) { |
| 529 | return c; |
| 530 | } |
| 531 | }; |
| 532 | assertTrue("Go struct passed through Java should not be wrapped", Testpkg.callCDupper(cdup)); |
| 533 | } |
| 534 | |
| 535 | public void testConstructor() { |
| 536 | Interface i = new Concrete(); |