Example #1
0
 def testVirtualDerived(self):
     self.assertEqual(t9.Derived().CoreValue(), 12)
     self.assertEqual(PyDerived().CoreValue(), 12)
     self.assertTrue(t9.Core.IsDestructed(), '~Core() not called')
Example #2
0
 def testCapsule(self):
     d = t9.Derived()
     self.assertEqual(d.Value(), 2)
     self.assertTrue(t9.IsDerived(d))
Example #3
0
 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)
Example #4
0
 def testVirtualDerived(self):
   self.assertEqual(t9.Derived().CoreValue(), 12)
   self.assertEqual(PyDerived().CoreValue(), 12)