[Lldb-commits] [lldb] r147893 - /lldb/trunk/test/types/AbstractBase.py

Johnny Chen johnny.chen at apple.com
Tue Jan 10 15:22:57 PST 2012


Author: johnny
Date: Tue Jan 10 17:22:57 2012
New Revision: 147893

URL: http://llvm.org/viewvc/llvm-project?rev=147893&view=rev
Log:
Add documentation for the generic functions build_and_run() and build_and_run_expr() called from
the Test*Types*.py test cases.

Modified:
    lldb/trunk/test/types/AbstractBase.py

Modified: lldb/trunk/test/types/AbstractBase.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/types/AbstractBase.py?rev=147893&r1=147892&r2=147893&view=diff
==============================================================================
--- lldb/trunk/test/types/AbstractBase.py (original)
+++ lldb/trunk/test/types/AbstractBase.py Tue Jan 10 17:22:57 2012
@@ -29,8 +29,26 @@
         # used for all the test cases.
         self.exe_name = self.testMethodName
 
-    # bc -> blockCaptured
-    # qd -> quotedDisplay
+    #==========================================================================#
+    # Functions build_and_run() and build_and_run_expr() are generic functions #
+    # which are called from the Test*Types*.py test cases.  The API client is  #
+    # responsible for supplying two mandatory arguments: the source file, e.g.,#
+    # 'int.cpp', and the atoms, e.g., set(['unsigned', 'long long']) to the    #
+    # functions.  There are also three optional keyword arguments of interest, #
+    # as follows:                                                              #
+    #                                                                          #
+    # dsym -> build for dSYM (defaulted to True)                               #
+    #         True: build dSYM file                                            #
+    #         False: build DWARF map                                           #
+    # bc -> blockCaptured (defaulted to False)                                 #
+    #         True: testing vars of various basic types from isnide a block    #
+    #         False: testing vars of various basic types from a function       #
+    # qd -> quotedDisplay (defaulted to False)                                 #
+    #         True: the output from 'frame var' or 'expr var' contains a pair  #
+    #               of single quotes around the value                          #
+    #         False: no single quotes are to be found around the value of      #
+    #                variable                                                  #
+    #==========================================================================#
 
     def build_and_run(self, source, atoms, dsym=True, bc=False, qd=False):
         self.build_and_run_with_source_atoms_expr(source, atoms, expr=False, dsym=dsym, bc=bc, qd=qd)
@@ -101,7 +119,7 @@
         for var, val in gl:
             self.runCmd("frame variable -T %s" % var)
             output = self.res.GetOutput()
-            
+
             # The input type is in a canonical form as a set of named atoms.
             # The display type string must conatin each and every element.
             #
@@ -183,7 +201,7 @@
 
             self.runCmd("expression %s" % var)
             output = self.res.GetOutput()
-            
+
             # The input type is in a canonical form as a set of named atoms.
             # The display type string must conatin each and every element.
             #





More information about the lldb-commits mailing list