diff options
Diffstat (limited to 'lldb/test/functionalities')
3 files changed, 21 insertions, 14 deletions
diff --git a/lldb/test/functionalities/data-formatter/data-formatter-cpp/TestDataFormatterCpp.py b/lldb/test/functionalities/data-formatter/data-formatter-cpp/TestDataFormatterCpp.py index 5eff106a14c..78213c629fc 100644 --- a/lldb/test/functionalities/data-formatter/data-formatter-cpp/TestDataFormatterCpp.py +++ b/lldb/test/functionalities/data-formatter/data-formatter-cpp/TestDataFormatterCpp.py @@ -267,6 +267,10 @@ class CppDataFormatterTestCase(TestBase): self.expect("frame variable the_coolest_guy", matching=False, substrs = ['(i_am_cooler) the_coolest_guy = goofy']) + # check that formats are not sticking since that is the behavior we want + self.expect("frame variable iAmInt --format hex", substrs = ['(int) iAmInt = 0x00000001']) + self.expect("frame variable iAmInt", matching=False, substrs = ['(int) iAmInt = 0x00000001']) + self.expect("frame variable iAmInt", substrs = ['(int) iAmInt = 1']) if __name__ == '__main__': import atexit diff --git a/lldb/test/functionalities/data-formatter/data-formatter-named-summaries/TestDataFormatterNamedSummaries.py b/lldb/test/functionalities/data-formatter/data-formatter-named-summaries/TestDataFormatterNamedSummaries.py index 9dee06eb2eb..f0576f63f48 100644 --- a/lldb/test/functionalities/data-formatter/data-formatter-named-summaries/TestDataFormatterNamedSummaries.py +++ b/lldb/test/functionalities/data-formatter/data-formatter-named-summaries/TestDataFormatterNamedSummaries.py @@ -64,13 +64,14 @@ class NamedSummariesDataFormatterTestCase(TestBase): self.expect("frame variable first --summary AllUseIt", substrs = ['AllUseIt: x=12']) - # We remember the summary choice... - self.expect("frame variable first", + # We *DO NOT* remember the summary choice anymore + self.expect("frame variable first", matching=False, substrs = ['AllUseIt: x=12']) - + self.expect("frame variable first", + substrs = ['First: x=12']) + self.runCmd("thread step-over") # 2 - # ...but not after a stoppoint self.expect("frame variable first", substrs = ['First: x=12']) @@ -111,17 +112,16 @@ class NamedSummariesDataFormatterTestCase(TestBase): substrs = ['FirstAndFriends: x=12', 'y=34']) - self.expect("frame variable first", - substrs = ['FirstAndFriends: x=12', - 'y=34']) + self.expect("frame variable first", matching=True, + substrs = ['x = 12', + 'y = 34']) self.runCmd("type summary delete FirstAndFriends") self.expect("type summary delete NoSuchSummary", error=True) self.runCmd("type summary delete AllUseIt") - self.expect("frame variable first", - substrs = ['FirstAndFriends: x=12', - 'y=34']) + self.expect("frame variable first", matching=False, + substrs = ['FirstAndFriends']) self.runCmd("thread step-over") # 4 diff --git a/lldb/test/functionalities/data-formatter/data-formatter-script/TestDataFormatterScript.py b/lldb/test/functionalities/data-formatter/data-formatter-script/TestDataFormatterScript.py index 74b6452f4d1..161fcf6427a 100644 --- a/lldb/test/functionalities/data-formatter/data-formatter-script/TestDataFormatterScript.py +++ b/lldb/test/functionalities/data-formatter/data-formatter-script/TestDataFormatterScript.py @@ -111,18 +111,21 @@ class ScriptDataFormatterTestCase(TestBase): self.runCmd("type summary add --name test_summary --python-script \"%s\"" % script) # attach the Python named summary to someone - self.runCmd("frame variable one --summary test_summary") - - self.expect("frame variable one", + self.expect("frame variable one --summary test_summary", substrs = ['Python summary']) # should not bind to the type self.expect("frame variable two", matching=False, substrs = ['Python summary']) + # and should not stick to the variable + self.expect("frame variable one",matching=False, + substrs = ['Python summary']) + self.runCmd("type summary add i_am_cool --summary-string \"Text summary\"") - self.expect("frame variable one", + # should be temporary only + self.expect("frame variable one",matching=False, substrs = ['Python summary']) # use the type summary |