summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lldb/test/functionalities/data-formatter/data-formatter-stl/map/TestDataFormatterStdMap.py27
-rw-r--r--lldb/test/functionalities/data-formatter/data-formatter-stl/map/main.cpp4
2 files changed, 19 insertions, 12 deletions
diff --git a/lldb/test/functionalities/data-formatter/data-formatter-stl/map/TestDataFormatterStdMap.py b/lldb/test/functionalities/data-formatter/data-formatter-stl/map/TestDataFormatterStdMap.py
index 9e54b7aa75b..002ace19e88 100644
--- a/lldb/test/functionalities/data-formatter/data-formatter-stl/map/TestDataFormatterStdMap.py
+++ b/lldb/test/functionalities/data-formatter/data-formatter-stl/map/TestDataFormatterStdMap.py
@@ -115,9 +115,13 @@ class StdMapDataFormatterTestCase(TestBase):
substrs = ['first =',
'second =']);
- # but check that expression does not rely on us
- self.expect("expression ii[0]", matching=False, error=True,
- substrs = ['first = 0'])
+ self.expect("frame variable ii[8]", matching=True,
+ substrs = ['1234567'])
+
+ # check that the expression parser does not make use of
+ # synthetic children instead of running code
+ self.expect("expression ii[8]", matching=False, error=True,
+ substrs = ['1234567'])
self.runCmd("n")
@@ -186,7 +190,8 @@ class StdMapDataFormatterTestCase(TestBase):
substrs = ['first = ', 'four',
'second = 4']);
- # but check that expression does not rely on us
+ # check that the expression parser does not make use of
+ # synthetic children instead of running code
self.expect("expression si[0]", matching=False, error=True,
substrs = ['first = ', 'zero'])
@@ -212,7 +217,7 @@ class StdMapDataFormatterTestCase(TestBase):
substrs = ['map has 4 items',
'[0] = ',
'second = \"goofy\"',
- 'first = 0',
+ 'first = 85',
'[1] = ',
'second = \"is\"',
'first = 1',
@@ -227,7 +232,7 @@ class StdMapDataFormatterTestCase(TestBase):
substrs = ['map has 4 items',
'[0] = ',
'second = \"goofy\"',
- 'first = 0',
+ 'first = 85',
'[1] = ',
'second = \"is\"',
'first = 1',
@@ -240,10 +245,11 @@ class StdMapDataFormatterTestCase(TestBase):
# check access-by-index
self.expect("frame variable is[0]",
- substrs = ['first = ', '0',
- 'second =', 'goofy']);
+ substrs = ['first = ',
+ 'second =']);
- # but check that expression does not rely on us
+ # check that the expression parser does not make use of
+ # synthetic children instead of running code
self.expect("expression is[0]", matching=False, error=True,
substrs = ['first = ', 'goofy'])
@@ -296,7 +302,8 @@ class StdMapDataFormatterTestCase(TestBase):
self.expect("frame variable ss[3]",
substrs = ['gatto', 'cat']);
- # but check that expression does not rely on us
+ # check that the expression parser does not make use of
+ # synthetic children instead of running code
self.expect("expression ss[3]", matching=False, error=True,
substrs = ['gatto'])
diff --git a/lldb/test/functionalities/data-formatter/data-formatter-stl/map/main.cpp b/lldb/test/functionalities/data-formatter/data-formatter-stl/map/main.cpp
index c341fe31fbb..58ab9980e14 100644
--- a/lldb/test/functionalities/data-formatter/data-formatter-stl/map/main.cpp
+++ b/lldb/test/functionalities/data-formatter/data-formatter-stl/map/main.cpp
@@ -19,7 +19,7 @@ int main()
ii[5] = 1;
ii[6] = 0;
ii[7] = 1;
- ii[8] = 0;
+ ii[85] = 1234567;
ii.clear();
@@ -35,7 +35,7 @@ int main()
intstr_map is;
- is[0] = "goofy";
+ is[85] = "goofy";
is[1] = "is";
is[2] = "smart";
is[3] = "!!!";
OpenPOWER on IntegriCloud