diff --git a/test/scripts/typeinfo.py b/test/scripts/typeinfo.py index 06ef4cd..e36a5cb 100644 --- a/test/scripts/typeinfo.py +++ b/test/scripts/typeinfo.py @@ -257,10 +257,16 @@ class TypeInfoTest( unittest.TestCase ): functype = target.module.typedVar( "CdeclFuncPtr" ).type().deref() self.assertTrue( functype.isFunction() ) + functype = target.module.typedVar( "g_variadicFuncPtr" ).type().deref() + self.assertTrue( functype.isFunction() ) + def testFunctionArgs(self): functype = target.module.typedVar( "CdeclFuncPtr" ).type().deref() self.assertEqual( [ arg.name() for arg in functype ], ["Int4B", "Float"] ) + functype = target.module.typedVar( "g_variadicFuncPtr" ).type().deref() + self.assertEqual( [ arg.name() for arg in functype ], ["Int4B", "..."] ) + def testFunctionCallConv(self): functype = target.module.typedVar( "CdeclFuncPtr" ).type().deref() self.assertEqual( functype.getCallingConvention(), pykd.callingConvention.NearC ) @@ -285,6 +291,9 @@ class TypeInfoTest( unittest.TestCase ): functype = target.module.typedVar( "ArrayOfMethodPtr" ).type()[0].deref() self.assertEqual(functype.name(), "Void(__thiscall FuncTestClass::)()") + functype = target.module.typedVar( "g_variadicFuncPtr" ).type().deref() + self.assertEqual(functype.name(), "Void(__cdecl)(Int4B, ...)") + def testFunctionPtrName(self): funcptrtype = target.module.typedVar( "CdeclFuncPtr" ).type() self.assertEqual(funcptrtype.name(), "Void(__cdecl*)(Int4B, Float)") @@ -292,6 +301,9 @@ class TypeInfoTest( unittest.TestCase ): functype = target.module.typedVar( "MethodPtr" ).type() self.assertEqual(functype.name(), "Void(__thiscall FuncTestClass::*)()") + funcptrtype = target.module.typedVar( "g_variadicFuncPtr" ).type() + self.assertEqual(funcptrtype.name(), "Void(__cdecl*)(Int4B, ...)") + def testFunctionArrName(self): funcptrtype = target.module.typedVar( "ArrayOfCdeclFuncPtr" ).type() self.assertEqual(funcptrtype.name(), "Void(__cdecl*[3])(Int4B, Float)")