From cfd405fb4214e2d53b413a10c84ba8deb20ef6a8 Mon Sep 17 00:00:00 2001 From: Johnny Chen Date: Wed, 29 Sep 2010 18:46:14 +0000 Subject: [PATCH] Turn on generic type tester for expression parser; preparing to file bugs. llvm-svn: 115063 --- lldb/test/types/AbstractBase.py | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/lldb/test/types/AbstractBase.py b/lldb/test/types/AbstractBase.py index f0e064197ae8..93aaa4d12f60 100644 --- a/lldb/test/types/AbstractBase.py +++ b/lldb/test/types/AbstractBase.py @@ -124,16 +124,24 @@ class GenericTester(TestBase): # The input type is in a canonical form as a set named atoms. # The display type string must conatin each and every element. - #dt = re.match("^\((.*)\)", output).group(1) + # + # Example: + # runCmd: expr a + # output: $0 = (double) 1100.12 + # + try: + dt = re.match("^\$[0-9]+ = \((.*)\)", output).group(1) + except: + self.fail("Data type from expression parser is parsed correctly") # Expect the display type string to contain each and every atoms. - #self.expect(dt, - # "Display type: '%s' must contain the type atoms: '%s'" % - # (dt, atoms), - # exe=False, - # substrs = list(atoms)) + self.expect(dt, + "Display type: '%s' must contain the type atoms: '%s'" % + (dt, atoms), + exe=False, + substrs = list(atoms)) - # The (var, val) pair must match, too. - #nv = (" %s = '%s'" if quotedDisplay else " %s = %s") % (var, val) - #self.expect(output, Msg(var, val), exe=False, - # substrs = [nv]) + # The val part must match, too. + valPart = ("'%s'" if quotedDisplay else "%s") % val + self.expect(output, Msg(var, val), exe=False, + substrs = [valPart])