From 215d5cc950582016b2ad4240a461725e2325b302 Mon Sep 17 00:00:00 2001 From: "SND\\EreTIk_cp" <SND\EreTIk_cp@9b283d60-5439-405e-af05-b73fd8c4d996> Date: Tue, 12 Jan 2016 12:46:12 +0000 Subject: [PATCH] [0.3.x] add: workitem 13815 tests git-svn-id: https://pykd.svn.codeplex.com/svn@90902 9b283d60-5439-405e-af05-b73fd8c4d996 --- test/scripts/typeinfo.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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)")