def testVirtualDerived(self): self.assertEqual(t9.Derived().CoreValue(), 12) self.assertEqual(PyDerived().CoreValue(), 12) self.assertTrue(t9.Core.IsDestructed(), '~Core() not called')
def testCapsule(self): d = t9.Derived() self.assertEqual(d.Value(), 2) self.assertTrue(t9.IsDerived(d))
def testCore(self): self.assertEqual(t9.CoreValue(t9.Core()), 12) self.assertEqual(t9.CoreValue(t9.Derived()), 12) self.assertEqual(t9.CoreValue(PyCore()), 12) self.assertEqual(t9.CoreValue(PyDerived()), 12)
def testVirtualDerived(self): self.assertEqual(t9.Derived().CoreValue(), 12) self.assertEqual(PyDerived().CoreValue(), 12)