예제 #1
0
파일: point_test.py 프로젝트: OdyX/Shiboken
 def testReturnConstPointer(self):
     '''Point returns a const pointer for itself.'''
     pt1 = Point(5.0, 2.3)
     refcount1 = sys.getrefcount(pt1)
     pt2 = pt1.getSelf()
     self.assertEqual(pt1, pt2)
     self.assertEqual(sys.getrefcount(pt1), refcount1 + 1)
     self.assertEqual(sys.getrefcount(pt1), sys.getrefcount(pt2))
예제 #2
0
 def testReturnConstPointer(self):
     '''Point returns a const pointer for itself.'''
     pt1 = Point(5.0, 2.3)
     refcount1 = sys.getrefcount(pt1)
     pt2 = pt1.getSelf()
     self.assertEqual(pt1, pt2)
     self.assertEqual(sys.getrefcount(pt1), refcount1 + 1)
     self.assertEqual(sys.getrefcount(pt1), sys.getrefcount(pt2))