[0.2.x]/[0.3.x] + test (failed)

git-svn-id: https://pykd.svn.codeplex.com/svn@87101 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
SND\EreTIk_cp 2014-01-20 16:38:22 +00:00 committed by Mikhail I. Izmestev
parent f21cda28f2
commit 0f736d0f8d

View File

@ -96,7 +96,6 @@ class CustomTypesTest(unittest.TestCase):
mySubStructPtr = mySubStruct.ptrTo() mySubStructPtr = mySubStruct.ptrTo()
self.assertEqual( pykd.ptrSize(), mySubStructPtr.size() ) self.assertEqual( pykd.ptrSize(), mySubStructPtr.size() )
def testAlign(self): def testAlign(self):
struct = pykd.createStruct(name ="MyAlignStruct", align=4) struct = pykd.createStruct(name ="MyAlignStruct", align=4)
struct.append( "m_field1", baseTypes.UInt1B ) struct.append( "m_field1", baseTypes.UInt1B )
@ -113,6 +112,11 @@ class CustomTypesTest(unittest.TestCase):
struct.append( "m_field7", baseTypes.UInt1B.arrayOf(5) ) struct.append( "m_field7", baseTypes.UInt1B.arrayOf(5) )
self.assertEqual( 20, struct.size() ) self.assertEqual( 20, struct.size() )
struct = pykd.createStruct(name ="MyAlignStruct", align=1)
struct.append( "m_field1", baseTypes.UInt1B )
struct.append( "m_field2", baseTypes.UInt8B )
self.assertEqual( 9, struct.size() )
def testUnionAlignedSize(self): def testUnionAlignedSize(self):
union = pykd.createUnion("MyCustomUnion", align=4) union = pykd.createUnion("MyCustomUnion", align=4)
union.append( "m_field1", baseTypes.UInt2B ) union.append( "m_field1", baseTypes.UInt2B )