示例#1
0
文件: t9_test.py 项目: yijunyu/clif
 def testVirtualDerived(self):
     self.assertEqual(t9.Derived().CoreValue(), 12)
     self.assertEqual(PyDerived().CoreValue(), 12)
     self.assertTrue(t9.Core.IsDestructed(), '~Core() not called')
示例#2
0
文件: t9_test.py 项目: yijunyu/clif
 def testCapsule(self):
     d = t9.Derived()
     self.assertEqual(d.Value(), 2)
     self.assertTrue(t9.IsDerived(d))
示例#3
0
文件: t9_test.py 项目: yijunyu/clif
 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)
示例#4
0
 def testVirtualDerived(self):
   self.assertEqual(t9.Derived().CoreValue(), 12)
   self.assertEqual(PyDerived().CoreValue(), 12)