making it so that the std::map test case does a better job at checking for interference between expression parser and synthetic children; plus being more verbose in the comments

llvm-svn: 150854
This commit is contained in:
Enrico Granata 2012-02-18 00:29:33 +00:00
parent c767c51b5d
commit d3e45fc363
2 changed files with 19 additions and 12 deletions

View File

@ -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'])

View File

@ -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] = "!!!";