[Lldb-commits] [lldb] r220513 - This test case should not rely on stepping behavior because that might chance due to inlining. Set breakpoints where you want them instead. Fixes rdar://18724175
Enrico Granata
egranata at apple.com
Thu Oct 23 14:35:19 PDT 2014
Author: enrico
Date: Thu Oct 23 16:35:18 2014
New Revision: 220513
URL: http://llvm.org/viewvc/llvm-project?rev=220513&view=rev
Log:
This test case should not rely on stepping behavior because that might chance due to inlining. Set breakpoints where you want them instead. Fixes rdar://18724175
Modified:
lldb/trunk/test/functionalities/type_completion/TestTypeCompletion.py
lldb/trunk/test/functionalities/type_completion/main.cpp
Modified: lldb/trunk/test/functionalities/type_completion/TestTypeCompletion.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/type_completion/TestTypeCompletion.py?rev=220513&r1=220512&r2=220513&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/type_completion/TestTypeCompletion.py (original)
+++ lldb/trunk/test/functionalities/type_completion/TestTypeCompletion.py Thu Oct 23 16:35:18 2014
@@ -30,14 +30,12 @@ class TypeCompletionTestCase(TestBase):
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
- # Find the line number to break at.
- self.line = line_number('main.cpp', '// Set break point at this line.')
def type_completion_commands(self):
"""Check that types only get completed when necessary."""
self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
- lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line, num_expected_locations=-1)
+ lldbutil.run_break_set_by_source_regexp (self, "// Set break point at this line.")
self.runCmd("run", RUN_SUCCEEDED)
@@ -62,15 +60,13 @@ class TypeCompletionTestCase(TestBase):
p_type = p_vector.GetType()
self.assertFalse(p_type.IsTypeComplete(), 'vector<T> complete but it should not be')
- self.runCmd("next")
- self.runCmd("next")
+ self.runCmd("continue")
p_vector = self.dbg.GetSelectedTarget().GetProcess().GetSelectedThread().GetSelectedFrame().FindVariable('p')
p_type = p_vector.GetType()
self.assertFalse(p_type.IsTypeComplete(), 'vector<T> complete but it should not be')
- self.runCmd("next")
- self.runCmd("next")
+ self.runCmd("continue")
self.runCmd("frame variable p --show-types")
@@ -81,8 +77,7 @@ class TypeCompletionTestCase(TestBase):
self.assertTrue(name_address_type.IsValid(), 'NameAndAddress should be valid')
self.assertFalse(name_address_type.IsTypeComplete(), 'NameAndAddress complete but it should not be')
- self.runCmd("next")
- self.runCmd("next")
+ self.runCmd("continue")
self.runCmd("frame variable guy --show-types")
@@ -102,8 +97,7 @@ class TypeCompletionTestCase(TestBase):
self.assertTrue(string.IsValid(), 'std::string should be valid')
self.assertFalse(string.IsTypeComplete(), 'std::string complete but it should not be')
- self.runCmd("next")
- self.runCmd("next")
+ self.runCmd("continue")
p_vector = self.dbg.GetSelectedTarget().GetProcess().GetSelectedThread().GetSelectedFrame().FindVariable('p')
p_type = p_vector.GetType()
Modified: lldb/trunk/test/functionalities/type_completion/main.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/type_completion/main.cpp?rev=220513&r1=220512&r2=220513&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/type_completion/main.cpp (original)
+++ lldb/trunk/test/functionalities/type_completion/main.cpp Thu Oct 23 16:35:18 2014
@@ -36,14 +36,14 @@ int main (int argc, const char * argv[])
p.push_back(NameAndAddress("Enrico","123 Main Street"));
p.push_back(NameAndAddress("Foo","10710 Johnson Avenue")); // Set break point at this line.
p.push_back(NameAndAddress("Arpia","6956 Florey Street"));
- p.push_back(NameAndAddress("Apple","1 Infinite Loop"));
+ p.push_back(NameAndAddress("Apple","1 Infinite Loop")); // Set break point at this line.
p.push_back(NameAndAddress("Richard","9500 Gilman Drive"));
p.push_back(NameAndAddress("Bar","3213 Windsor Rd"));
for (int j = 0; j<p.size(); j++)
{
NameAndAddress guy = p[j];
- std::cout << "Person " << j << " is named " << guy.GetName() << " and lives at " << guy.GetAddress() << std::endl;
+ std::cout << "Person " << j << " is named " << guy.GetName() << " and lives at " << guy.GetAddress() << std::endl; // Set break point at this line.
}
return 0;
More information about the lldb-commits
mailing list