From 0f736d0f8da02b0cd9ded05f4f24597f5f56e5dc Mon Sep 17 00:00:00 2001 From: "SND\\EreTIk_cp" Date: Mon, 20 Jan 2014 16:38:22 +0000 Subject: [PATCH] [0.2.x]/[0.3.x] + test (failed) git-svn-id: https://pykd.svn.codeplex.com/svn@87101 9b283d60-5439-405e-af05-b73fd8c4d996 --- test/scripts/customtypestest.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/scripts/customtypestest.py b/test/scripts/customtypestest.py index 6b5e253..99b1b4f 100644 --- a/test/scripts/customtypestest.py +++ b/test/scripts/customtypestest.py @@ -96,7 +96,6 @@ class CustomTypesTest(unittest.TestCase): mySubStructPtr = mySubStruct.ptrTo() self.assertEqual( pykd.ptrSize(), mySubStructPtr.size() ) - def testAlign(self): struct = pykd.createStruct(name ="MyAlignStruct", align=4) struct.append( "m_field1", baseTypes.UInt1B ) @@ -113,6 +112,11 @@ class CustomTypesTest(unittest.TestCase): struct.append( "m_field7", baseTypes.UInt1B.arrayOf(5) ) 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): union = pykd.createUnion("MyCustomUnion", align=4) union.append( "m_field1", baseTypes.UInt2B )