[Lldb-commits] [lldb] r149461 - /lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/list/TestDataFormatterStdList.py
Enrico Granata
granata.enrico at gmail.com
Tue Jan 31 16:43:34 PST 2012
Author: enrico
Date: Tue Jan 31 18:43:33 2012
New Revision: 149461
URL: http://llvm.org/viewvc/llvm-project?rev=149461&view=rev
Log:
remove spurious leftover code from std::list testcase
Modified:
lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/list/TestDataFormatterStdList.py
Modified: lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/list/TestDataFormatterStdList.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/list/TestDataFormatterStdList.py?rev=149461&r1=149460&r2=149461&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/list/TestDataFormatterStdList.py (original)
+++ lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/list/TestDataFormatterStdList.py Tue Jan 31 18:43:33 2012
@@ -167,10 +167,10 @@
self.expect("p text_list",
substrs = ['list has 4 items',
- '[0] = \"goofy\"',
- '[1] = \"is\"',
- '[2] = \"smart\"',
- '[3] = \"!!!\"'])
+ '\"goofy\"',
+ '\"is\"',
+ '\"smart\"',
+ '\"!!!\"'])
# check access-by-index
self.expect("frame variable text_list[0]",
@@ -182,270 +182,6 @@
self.expect("expression text_list[0]", matching=False, error=True,
substrs = ['goofy'])
- # now std::map<K,V>
- # also take a chance to test regex synth here
-
- self.runCmd("n")
- self.runCmd("frame variable ii -T")
-
- #self.runCmd("script from StdMapSynthProvider import *")
- self.runCmd("type summary add -x \"std::map<\" --summary-string \"map has ${svar%#} items\" -e")
-
- #import time
- #time.sleep(30)
-
- #self.runCmd("type synth add -x \"std::map<\" -l StdMapSynthProvider")
-
-
- self.expect('frame variable ii',
- substrs = ['map has 0 items',
- '{}'])
-
- self.runCmd("n");self.runCmd("n");
-
- self.expect('frame variable ii',
- substrs = ['map has 2 items',
- '[0] = {',
- 'first = 0',
- 'second = 0',
- '[1] = {',
- 'first = 1',
- 'second = 1'])
-
- self.runCmd("n");self.runCmd("n");
-
- self.expect('frame variable ii',
- substrs = ['map has 4 items',
- '[2] = {',
- 'first = 2',
- 'second = 0',
- '[3] = {',
- 'first = 3',
- 'second = 1'])
-
- self.runCmd("n");self.runCmd("n");
- self.runCmd("n");self.runCmd("n");self.runCmd("n");
-
- self.expect("frame variable ii",
- substrs = ['map has 9 items',
- '[5] = {',
- 'first = 5',
- 'second = 0',
- '[7] = {',
- 'first = 7',
- 'second = 1'])
-
- self.expect("p ii",
- substrs = ['map has 9 items',
- '[5] = {',
- 'first = 5',
- 'second = 0',
- '[7] = {',
- 'first = 7',
- 'second = 1'])
-
- # check access-by-index
- self.expect("frame variable ii[0]",
- substrs = ['first = 0',
- 'second = 0']);
- self.expect("frame variable ii[3]",
- 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.runCmd("n")
-
- self.expect('frame variable ii',
- substrs = ['map has 0 items',
- '{}'])
-
- self.runCmd("n")
- self.runCmd("frame variable si -T")
-
- #self.runCmd("type summary add std::strint_map strint_map --summary-string \"map has ${svar%#} items\" -e")
- #self.runCmd("type synth add std::strint_map strint_map -l StdMapSynthProvider")
-
- self.expect('frame variable si',
- substrs = ['map has 0 items',
- '{}'])
-
- self.runCmd("n")
-
- self.expect('frame variable si',
- substrs = ['map has 1 items',
- '[0] = ',
- 'first = \"zero\"',
- 'second = 0'])
-
- self.runCmd("n");self.runCmd("n");self.runCmd("n");self.runCmd("n");
-
- self.expect("frame variable si",
- substrs = ['map has 5 items',
- '[0] = ',
- 'first = \"zero\"',
- 'second = 0',
- '[1] = ',
- 'first = \"one\"',
- 'second = 1',
- '[2] = ',
- 'first = \"two\"',
- 'second = 2',
- '[3] = ',
- 'first = \"three\"',
- 'second = 3',
- '[4] = ',
- 'first = \"four\"',
- 'second = 4'])
-
- self.expect("p si",
- substrs = ['map has 5 items',
- '[0] = ',
- 'first = \"zero\"',
- 'second = 0',
- '[1] = ',
- 'first = \"one\"',
- 'second = 1',
- '[2] = ',
- 'first = \"two\"',
- 'second = 2',
- '[3] = ',
- 'first = \"three\"',
- 'second = 3',
- '[4] = ',
- 'first = \"four\"',
- 'second = 4'])
-
- # check access-by-index
- self.expect("frame variable si[0]",
- substrs = ['first = ', 'four',
- 'second = 4']);
-
- # but check that expression does not rely on us
- self.expect("expression si[0]", matching=False, error=True,
- substrs = ['first = ', 'zero'])
-
- self.runCmd("n")
-
- self.expect('frame variable si',
- substrs = ['map has 0 items',
- '{}'])
-
- self.runCmd("n")
- self.runCmd("frame variable is -T")
-
- #self.runCmd("type summary add std::intstr_map intstr_map --summary-string \"map has ${svar%#} items\" -e")
- #self.runCmd("type synth add std::intstr_map intstr_map -l StdMapSynthProvider")
-
- self.expect('frame variable is',
- substrs = ['map has 0 items',
- '{}'])
-
- self.runCmd("n");self.runCmd("n");self.runCmd("n");self.runCmd("n");
-
- self.expect("frame variable is",
- substrs = ['map has 4 items',
- '[0] = ',
- 'second = \"goofy\"',
- 'first = 0',
- '[1] = ',
- 'second = \"is\"',
- 'first = 1',
- '[2] = ',
- 'second = \"smart\"',
- 'first = 2',
- '[3] = ',
- 'second = \"!!!\"',
- 'first = 3'])
-
- self.expect("p is",
- substrs = ['map has 4 items',
- '[0] = ',
- 'second = \"goofy\"',
- 'first = 0',
- '[1] = ',
- 'second = \"is\"',
- 'first = 1',
- '[2] = ',
- 'second = \"smart\"',
- 'first = 2',
- '[3] = ',
- 'second = \"!!!\"',
- 'first = 3'])
-
- # check access-by-index
- self.expect("frame variable is[0]",
- substrs = ['first = ', '0',
- 'second =', 'goofy']);
-
- # but check that expression does not rely on us
- self.expect("expression is[0]", matching=False, error=True,
- substrs = ['first = ', 'goofy'])
-
- self.runCmd("n")
-
- self.expect('frame variable is',
- substrs = ['map has 0 items',
- '{}'])
-
- self.runCmd("n")
- self.runCmd("frame variable ss -T")
-
- #self.runCmd("type summary add std::strstr_map strstr_map --summary-string \"map has ${svar%#} items\" -e")
- #self.runCmd("type synth add std::strstr_map strstr_map -l StdMapSynthProvider")
-
- self.expect('frame variable ss',
- substrs = ['map has 0 items',
- '{}'])
-
- self.runCmd("n");self.runCmd("n");self.runCmd("n");self.runCmd("n");
-
- self.expect("frame variable ss",
- substrs = ['map has 4 items',
- '[0] = ',
- 'second = \"hello\"',
- 'first = \"ciao\"',
- '[1] = ',
- 'second = \"house\"',
- 'first = \"casa\"',
- '[2] = ',
- 'second = \"cat\"',
- 'first = \"gatto\"',
- '[3] = ',
- 'second = \"..is always a Mac!\"',
- 'first = \"a Mac..\"'])
-
- self.expect("p ss",
- substrs = ['map has 4 items',
- '[0] = ',
- 'second = \"hello\"',
- 'first = \"ciao\"',
- '[1] = ',
- 'second = \"house\"',
- 'first = \"casa\"',
- '[2] = ',
- 'second = \"cat\"',
- 'first = \"gatto\"',
- '[3] = ',
- 'second = \"..is always a Mac!\"',
- 'first = \"a Mac..\"'])
-
- # check access-by-index
- self.expect("frame variable ss[3]",
- substrs = ['gatto', 'cat']);
-
- # but check that expression does not rely on us
- self.expect("expression ss[3]", matching=False, error=True,
- substrs = ['gatto'])
-
- self.runCmd("n")
-
- self.expect('frame variable ss',
- substrs = ['map has 0 items',
- '{}'])
-
if __name__ == '__main__':
import atexit
lldb.SBDebugger.Initialize()
More information about the lldb-commits
mailing list