diff options
Diffstat (limited to 'packages/Python/lldbsuite/test/lang/c/enum_types/TestEnumTypes.py')
-rw-r--r-- | packages/Python/lldbsuite/test/lang/c/enum_types/TestEnumTypes.py | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/packages/Python/lldbsuite/test/lang/c/enum_types/TestEnumTypes.py b/packages/Python/lldbsuite/test/lang/c/enum_types/TestEnumTypes.py index b0c5c882f6a9..044accf14f65 100644 --- a/packages/Python/lldbsuite/test/lang/c/enum_types/TestEnumTypes.py +++ b/packages/Python/lldbsuite/test/lang/c/enum_types/TestEnumTypes.py @@ -8,6 +8,7 @@ import os, time import lldb from lldbsuite.test.lldbtest import * import lldbsuite.test.lldbutil as lldbutil +from lldbsuite.test.decorators import * class EnumTypesTestCase(TestBase): @@ -19,6 +20,7 @@ class EnumTypesTestCase(TestBase): # Find the line number to break inside main(). self.line = line_number('main.c', '// Set break point at this line.') + @expectedFailureAll(oslist=['windows']) # derefing the null pointer "works" on Windows def test(self): """Test 'image lookup -t days' and check for correct display and enum value printing.""" self.build() @@ -53,10 +55,10 @@ class EnumTypesTestCase(TestBase): 'kNumDays', '}']) - enum_values = [ '-4', - 'Monday', - 'Tuesday', - 'Wednesday', + enum_values = [ '-4', + 'Monday', + 'Tuesday', + 'Wednesday', 'Thursday', 'Friday', 'Saturday', @@ -64,6 +66,13 @@ class EnumTypesTestCase(TestBase): 'kNumDays', '5']; + # Make sure a pointer to an anonymous enum type does crash LLDB and displays correctly using + # frame variable and expression commands + self.expect('frame variable f.op', DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ['ops *', 'f.op'], patterns = ['0x0+$']) + self.expect('frame variable *f.op', DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ['ops', '*f.op', '<parent is NULL>']) + self.expect('expr f.op', DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ['ops *', '$'], patterns = ['0x0+$']) + self.expect('expr *f.op', DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ['error:'], error = True) + bkpt = self.target().FindBreakpointByID(bkpt_id) for enum_value in enum_values: self.expect("frame variable day", 'check for valid enumeration value', |