From b25a6484641067a95b82960428b484fdf4f81297 Mon Sep 17 00:00:00 2001 From: "SND\\EreTIk_cp" Date: Thu, 14 Nov 2013 10:44:06 +0000 Subject: [PATCH] [0.3.x] add: test for array of functions git-svn-id: https://pykd.svn.codeplex.com/svn@86410 9b283d60-5439-405e-af05-b73fd8c4d996 --- test/scripts/typeinfo.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/test/scripts/typeinfo.py b/test/scripts/typeinfo.py index d9be331..1dbce0b 100644 --- a/test/scripts/typeinfo.py +++ b/test/scripts/typeinfo.py @@ -266,9 +266,22 @@ class TypeInfoTest( unittest.TestCase ): functype = target.module.typedVar( "MethodPtr" ).type().deref() 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): funcptrtype = target.module.typedVar( "CdeclFuncPtr" ).type() self.assertEqual(funcptrtype.name(), "Void(__cdecl*)(Int4B, Float)") functype = target.module.typedVar( "MethodPtr" ).type().deref() 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])()")