From 4ec6bec3a0727b9ad4b8eff343e0a8dc1577c150 Mon Sep 17 00:00:00 2001 From: "SND\\EreTIk_cp" Date: Thu, 19 Jan 2012 14:19:00 +0000 Subject: [PATCH] [0.1.x] ~ fixed tests git-svn-id: https://pykd.svn.codeplex.com/svn@73299 9b283d60-5439-405e-af05-b73fd8c4d996 --- test/scripts/typedvar.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/scripts/typedvar.py b/test/scripts/typedvar.py index 6375f35..0be09e5 100644 --- a/test/scripts/typedvar.py +++ b/test/scripts/typedvar.py @@ -171,7 +171,10 @@ class TypedVarTest( unittest.TestCase ): def testPointerToFunction( self ): tv1 = target.module.typedVar( "g_unTypedPtrToFunction" ) - self.assertEqual( target.module.offset("EnumWindowsProc2"), tv1 ) + + # if debug: g_unTypedPtrToFunction point to jmp EnumWindowsProc2 (e9 xxxxxxxx) + self.assertTrue( ( target.module.offset("EnumWindowsProc2") == tv1 ) or + ( 0xE9 == pykd.ptrByte( int(tv1) ) ) ) tv2 = target.module.typedVar( "g_unTypedPtrToFunction" ) self.assertEqual( tv1, tv2 )