diff options
author | Greg Clayton <gclayton@apple.com> | 2012-11-06 18:22:59 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2012-11-06 18:22:59 +0000 |
commit | 9f078b773d8346fb0da68ec65d5ab12d99c56bf9 (patch) | |
tree | 7417f0cf15ccbd4da0148e677d01183e16f242ab /lldb/test/lang/c/bitfields/TestBitfields.py | |
parent | 2fa5fb5ab8a78ab9852954669a369eea79a1c757 (diff) | |
download | bcm5719-llvm-9f078b773d8346fb0da68ec65d5ab12d99c56bf9.tar.gz bcm5719-llvm-9f078b773d8346fb0da68ec65d5ab12d99c56bf9.zip |
Added unnamed bitfields to our bitfield test.
llvm-svn: 167473
Diffstat (limited to 'lldb/test/lang/c/bitfields/TestBitfields.py')
-rw-r--r-- | lldb/test/lang/c/bitfields/TestBitfields.py | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/lldb/test/lang/c/bitfields/TestBitfields.py b/lldb/test/lang/c/bitfields/TestBitfields.py index 66caa52c1fd..177242305e8 100644 --- a/lldb/test/lang/c/bitfields/TestBitfields.py +++ b/lldb/test/lang/c/bitfields/TestBitfields.py @@ -113,15 +113,14 @@ class BitfieldsTestCase(TestBase): frame = thread.GetFrameAtIndex(0) bits = frame.FindVariable("bits") self.DebugSBValue(bits) - self.assertTrue(bits.GetTypeName() == "Bits" and - bits.GetNumChildren() == 8 and - bits.GetByteSize() == 32, - "(Bits)bits with byte size of 32 and 8 children") + self.assertTrue(bits.GetTypeName() == 'Bits', "bits.GetTypeName() == 'Bits'"); + self.assertTrue(bits.GetNumChildren() == 10, "bits.GetNumChildren() == 10"); + self.assertTrue(bits.GetByteSize() == 32, "bits.GetByteSize() == 32"); # Notice the pattern of int(b1.GetValue(), 0). We pass a base of 0 # so that the proper radix is determined based on the contents of the # string. - b1 = bits.GetChildAtIndex(0) + b1 = bits.GetChildMemberWithName("b1") self.DebugSBValue(b1) self.assertTrue(b1.GetName() == "b1" and b1.GetTypeName() == "uint32_t:1" and @@ -129,7 +128,7 @@ class BitfieldsTestCase(TestBase): int(b1.GetValue(), 0) == 1, 'bits.b1 has type uint32_t:1, is in scope, and == 1') - b7 = bits.GetChildAtIndex(6) + b7 = bits.GetChildMemberWithName("b7") self.DebugSBValue(b7) self.assertTrue(b7.GetName() == "b7" and b7.GetTypeName() == "uint32_t:7" and @@ -137,7 +136,7 @@ class BitfieldsTestCase(TestBase): int(b7.GetValue(), 0) == 127, 'bits.b7 has type uint32_t:7, is in scope, and == 127') - four = bits.GetChildAtIndex(7) + four = bits.GetChildMemberWithName("four") self.DebugSBValue(four) self.assertTrue(four.GetName() == "four" and four.GetTypeName() == "uint32_t:4" and |