mirror of
https://github.com/ivellioscolin/pykd.git
synced 2025-04-20 03:23:23 +08:00
[0.2.x] added : test for unnamed nested structures
git-svn-id: https://pykd.svn.codeplex.com/svn@83402 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
parent
73f824a79e
commit
88ed1db5a7
@ -78,11 +78,11 @@ class ModuleTest( unittest.TestCase ):
|
||||
fileName = pykd.getSourceFile(target.module.FuncWithName0 )
|
||||
self.assertTrue( re.search('targetapp\\.cpp', fileName ) )
|
||||
fileName, lineNo, displacement = pykd.getSourceLine( target.module.FuncWithName0 + 2)
|
||||
self.assertEqual( 400, lineNo )
|
||||
self.assertEqual( 404, lineNo )
|
||||
self.assertTrue( re.search('targetapp\\.cpp', fileName ) )
|
||||
self.assertEqual( 2, displacement )
|
||||
fileName, lineNo, displacement = pykd.getSourceLine()
|
||||
self.assertEqual( 673, lineNo )
|
||||
self.assertEqual( 677, lineNo )
|
||||
|
||||
def testEnumSymbols( self ):
|
||||
lst = target.module.enumSymbols()
|
||||
|
@ -167,6 +167,7 @@ class TypeInfoTest( unittest.TestCase ):
|
||||
ti = target.module.type("StructWithNested")
|
||||
self.assertTrue( hasattr( ti, "m_field" ) )
|
||||
self.assertFalse( hasattr( ti, "m_nestedFiled" ) )
|
||||
self.assertFalse( hasattr( ti, "m_field2" ) )
|
||||
|
||||
ti = target.module.type("StructWithNested::Nested")
|
||||
self.assertTrue( hasattr( ti, "m_nestedFiled" ) )
|
||||
|
@ -275,6 +275,10 @@ struct StructWithNested {
|
||||
int m_nestedFiled;
|
||||
};
|
||||
int m_field;
|
||||
|
||||
struct {
|
||||
int m_field2;
|
||||
};
|
||||
};
|
||||
|
||||
StructWithNested g_structWithNested;
|
||||
|
Loading…
Reference in New Issue
Block a user