<rdar://problem/14086503>

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



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@184264 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vector/TestDataFormatterStdVector.py b/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vector/TestDataFormatterStdVector.py
index 589e668..8061032 100644
--- a/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vector/TestDataFormatterStdVector.py
+++ b/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vector/TestDataFormatterStdVector.py
@@ -36,7 +36,7 @@
         """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 @@
         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 @@
                                '}'])
 
         # 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 @@
         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 @@
         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 @@
                                '}'])
 
         # 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 @@
                                'is',
                                'smart'])
 
-        self.runCmd("n");
+        self.runCmd("c");
 
         self.expect("frame variable strings",
                     substrs = ['vector has 4 items'])
@@ -211,7 +208,7 @@
         # 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'])
diff --git a/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vector/main.cpp b/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vector/main.cpp
index 177c67d..0109179 100644
--- a/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vector/main.cpp
+++ b/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vector/main.cpp
@@ -7,25 +7,25 @@
 {
     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.
 }