예제 #1
0
 def testDrawTextRectFStrEcho(self):
     overload = Overload()
     self.assertEqual(overload.drawText(RectF(), Str()), Overload.Function4)
     self.assertEqual(overload.drawText(RectF(), ''), Overload.Function4)
     self.assertEqual(overload.drawText(RectF(), Str(), Echo()),
                      Overload.Function4)
     self.assertEqual(overload.drawText(RectF(), '', Echo()),
                      Overload.Function4)
     self.assertEqual(overload.drawText(Rect(), Str()), Overload.Function4)
     self.assertEqual(overload.drawText(Rect(), ''), Overload.Function4)
     self.assertEqual(overload.drawText(Rect(), Str(), Echo()),
                      Overload.Function4)
     self.assertEqual(overload.drawText(Rect(), '', Echo()),
                      Overload.Function4)
예제 #2
0
 def testCallOperator(self):
     e = Echo()
     self.assertEqual(e("Hello", 3), "Hello3")
예제 #3
0
 def testEcho(self):
     '''Test function added with const char * as arg'''
     x = 'Foobar'
     y = Echo().echo(x)
     self.assertEqual(x, y)