[Lldb-commits] [lldb] r184264 - <rdar://problem/14086503>

Enrico Granata egranata at apple.com
Tue Jun 18 17:14:02 PDT 2013


Author: enrico
Date: Tue Jun 18 19:14:02 2013
New Revision: 184264

URL: http://llvm.org/viewvc/llvm-project?rev=184264&view=rev
Log:
<rdar://problem/14086503>

Hardening the libstdc++ std::vector test case against line table changes


Modified:
    lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vector/TestDataFormatterStdVector.py
    lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vector/main.cpp

Modified: lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vector/TestDataFormatterStdVector.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vector/TestDataFormatterStdVector.py?rev=184264&r1=184263&r2=184264&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vector/TestDataFormatterStdVector.py (original)
+++ lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vector/TestDataFormatterStdVector.py Tue Jun 18 19:14:02 2013
@@ -36,7 +36,7 @@ class StdVectorDataFormatterTestCase(Tes
         """Test that that file and class static variables display correctly."""
         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)
 
@@ -61,7 +61,7 @@ class StdVectorDataFormatterTestCase(Tes
         self.expect("frame variable numbers",
             substrs = ['numbers = size=0'])
 
-        self.runCmd("n")
+        self.runCmd("c")
         
         # first value added
         self.expect("frame variable numbers",
@@ -70,7 +70,7 @@ class StdVectorDataFormatterTestCase(Tes
                                '}'])
 
         # add some more data
-        self.runCmd("n");self.runCmd("n");self.runCmd("n");
+        self.runCmd("c");
     
         self.expect("frame variable numbers",
                     substrs = ['numbers = size=4',
@@ -104,7 +104,7 @@ class StdVectorDataFormatterTestCase(Tes
         self.runCmd("type summary delete int_vect")
 
         # add some more data
-        self.runCmd("n");self.runCmd("n");self.runCmd("n");
+        self.runCmd("c");
 
         self.expect("frame variable numbers",
                     substrs = ['numbers = size=7',
@@ -148,12 +148,12 @@ class StdVectorDataFormatterTestCase(Tes
         self.assertTrue(self.frame().FindVariable("numbers").MightHaveChildren(), "numbers.MightHaveChildren() says False for non empty!")
 
         # clear out the vector and see that we do the right thing once again
-        self.runCmd("n")
+        self.runCmd("c")
 
         self.expect("frame variable numbers",
             substrs = ['numbers = size=0'])
 
-        self.runCmd("n")
+        self.runCmd("c")
 
         # first value added
         self.expect("frame variable numbers",
@@ -162,10 +162,7 @@ class StdVectorDataFormatterTestCase(Tes
                                '}'])
 
         # check if we can display strings
-        self.runCmd("n")
-        self.runCmd("n")
-        self.runCmd("n")
-        self.runCmd("n")
+        self.runCmd("c")
 
         self.expect("frame variable strings",
             substrs = ['goofy',
@@ -191,7 +188,7 @@ class StdVectorDataFormatterTestCase(Tes
                                'is',
                                'smart'])
 
-        self.runCmd("n");
+        self.runCmd("c");
 
         self.expect("frame variable strings",
                     substrs = ['vector has 4 items'])
@@ -211,7 +208,7 @@ class StdVectorDataFormatterTestCase(Tes
         # check that MightHaveChildren() gets it right
         self.assertTrue(self.frame().FindVariable("strings").MightHaveChildren(), "strings.MightHaveChildren() says False for non empty!")
 
-        self.runCmd("n")
+        self.runCmd("c")
 
         self.expect("frame variable strings",
             substrs = ['vector has 0 items'])

Modified: lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vector/main.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vector/main.cpp?rev=184264&r1=184263&r2=184264&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vector/main.cpp (original)
+++ lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vector/main.cpp Tue Jun 18 19:14:02 2013
@@ -7,25 +7,25 @@ int main()
 {
     int_vect numbers;
     numbers.push_back(1);  // Set break point at this line.
-    numbers.push_back(12);
+    numbers.push_back(12);  // Set break point at this line.
     numbers.push_back(123);
     numbers.push_back(1234);
-    numbers.push_back(12345);
+    numbers.push_back(12345);  // Set break point at this line.
     numbers.push_back(123456);
     numbers.push_back(1234567);
     
-    numbers.clear();
+    numbers.clear();  // Set break point at this line.
     
-    numbers.push_back(7);
+    numbers.push_back(7);  // Set break point at this line.
 
-    string_vect strings;
+    string_vect strings;  // Set break point at this line.
     strings.push_back(std::string("goofy"));
     strings.push_back(std::string("is"));
     strings.push_back(std::string("smart"));
     
-    strings.push_back(std::string("!!!"));
+    strings.push_back(std::string("!!!"));  // Set break point at this line.
     
-    strings.clear();
+    strings.clear();  // Set break point at this line.
     
-    return 0;
+    return 0;// Set break point at this line.
 }





More information about the lldb-commits mailing list