[0.3.x] add: test for array of functions

git-svn-id: https://pykd.svn.codeplex.com/svn@86410 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
SND\EreTIk_cp 2013-11-14 10:44:06 +00:00 committed by Mikhail I. Izmestev
parent 260f9f8685
commit b25a648464

View File

@ -266,9 +266,22 @@ class TypeInfoTest( unittest.TestCase ):
functype = target.module.typedVar( "MethodPtr" ).type().deref() functype = target.module.typedVar( "MethodPtr" ).type().deref()
self.assertEqual(functype.name(), "Void(__thiscall FuncTestClass::)()") self.assertEqual(functype.name(), "Void(__thiscall FuncTestClass::)()")
functype = target.module.typedVar( "ArrayOfCdeclFuncPtr" ).type()[0].deref()
self.assertEqual(functype.name(), "Void(__cdecl)(Int4B, Float)")
functype = target.module.typedVar( "ArrayOfMethodPtr" ).type()[0].deref()
self.assertEqual(functype.name(), "Void(__thiscall FuncTestClass::)()")
def testFunctionPtrName(self): def testFunctionPtrName(self):
funcptrtype = target.module.typedVar( "CdeclFuncPtr" ).type() funcptrtype = target.module.typedVar( "CdeclFuncPtr" ).type()
self.assertEqual(funcptrtype.name(), "Void(__cdecl*)(Int4B, Float)") self.assertEqual(funcptrtype.name(), "Void(__cdecl*)(Int4B, Float)")
functype = target.module.typedVar( "MethodPtr" ).type().deref() functype = target.module.typedVar( "MethodPtr" ).type().deref()
self.assertEqual(functype.name(), "Void(__thiscall FuncTestClass::*)()") self.assertEqual(functype.name(), "Void(__thiscall FuncTestClass::*)()")
def testFunctionArrName(self):
funcptrtype = target.module.typedVar( "ArrayOfCdeclFuncPtr" ).type()
self.assertEqual(funcptrtype.name(), "Void(__cdecl*[3])(Int4B, Float)")
functype = target.module.typedVar( "ArrayOfMethodPtr" ).type().deref()
self.assertEqual(functype.name(), "Void(__thiscall FuncTestClass::*[2])()")