[Lldb-commits] [lldb] r114923 - in /lldb/trunk/test: dotest.py types/TestBasicTypes.py types/TestFloatTypes.py types/TestIntegerTypes.py types/double.cpp types/float.cpp

Johnny Chen johnny.chen at apple.com
Mon Sep 27 16:29:54 PDT 2010


Author: johnny
Date: Mon Sep 27 18:29:54 2010
New Revision: 114923

URL: http://llvm.org/viewvc/llvm-project?rev=114923&view=rev
Log:
Added "float" and "double" to types/TestBasicTypes.py.  Abstracted the generic
type tester method into its own abstarct base class 'AbstractBase'.  And
added TestIntegerTypes.py and TestFloatTypes.py.

Added an option "-p reg-exp-pattern" to the test driver to specify a regular
expression pattern to match against eligible filenames as our test cases.

An example: 

/Volumes/data/lldb/svn/trunk/test $ ./dotest.py -v -p "TestFloat.*" types
----------------------------------------------------------------------
Collected 4 tests

test_double_type_with_dsym (TestFloatTypes.FloatTypesTestCase)
Test that double-type variables are displayed correctly. ... ok
test_double_type_with_dwarf (TestFloatTypes.FloatTypesTestCase)
Test that double-type variables are displayed correctly. ... ok
test_float_type_with_dwarf (TestFloatTypes.FloatTypesTestCase)
Test that float-type variables are displayed correctly. ... ok
test_float_types_with_dsym (TestFloatTypes.FloatTypesTestCase)
Test that float-type variables are displayed correctly. ... ok

----------------------------------------------------------------------
Ran 4 tests in 5.592s

OK

Added:
    lldb/trunk/test/types/TestFloatTypes.py
    lldb/trunk/test/types/TestIntegerTypes.py
    lldb/trunk/test/types/double.cpp
    lldb/trunk/test/types/float.cpp
Modified:
    lldb/trunk/test/dotest.py
    lldb/trunk/test/types/TestBasicTypes.py

Modified: lldb/trunk/test/dotest.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/dotest.py?rev=114923&r1=114922&r2=114923&view=diff
==============================================================================
--- lldb/trunk/test/dotest.py (original)
+++ lldb/trunk/test/dotest.py Mon Sep 27 18:29:54 2010
@@ -57,6 +57,9 @@
 # Ignore the build search path relative to this script to locate the lldb.py module.
 ignore = False
 
+# The regular expression pattern to match against eligible filenames as our test cases.
+regexp = None
+
 # Default verbosity is 0.
 verbose = 0
 
@@ -77,6 +80,7 @@
 -d   : delay startup for 10 seconds (in order for the debugger to attach)
 -i   : ignore (don't bailout) if 'lldb.py' module cannot be located in the build
        tree relative to this script; use PYTHONPATH to locate the module
+-p   : specify a regexp filename pattern for inclusion in the test suite
 -t   : trace lldb command execution and result
 -v   : do verbose mode of unittest framework
 
@@ -109,7 +113,8 @@
 
     global configFile
     global delay
-    global inore
+    global ignore
+    global regexp
     global verbose
     global testdirs
 
@@ -141,6 +146,13 @@
         elif sys.argv[index].startswith('-i'):
             ignore = True
             index += 1
+        elif sys.argv[index].startswith('-p'):
+            # Increment by 1 to fetch the reg exp pattern argument.
+            index += 1
+            if index >= len(sys.argv) or sys.argv[index].startswith('-'):
+                usage()
+            regexp = sys.argv[index]
+            index += 1
         elif sys.argv[index].startswith('-t'):
             os.environ["LLDB_COMMAND_TRACE"] = "YES"
             index += 1
@@ -246,13 +258,24 @@
     """Visitor function for os.path.walk(path, visit, arg)."""
 
     global suite
+    global regexp
 
     for name in names:
         if os.path.isdir(os.path.join(dir, name)):
             continue
 
         if '.py' == os.path.splitext(name)[1] and name.startswith(prefix):
-            # We found a pattern match for our test case.  Add it to the suite.
+            # Try to match the regexp pattern, if specified.
+            if regexp:
+                import re
+                if re.search(regexp, name):
+                    #print "Filename: '%s' matches pattern: '%s'" % (name, regexp)
+                    pass
+                else:
+                    #print "Filename: '%s' does not match pattern: '%s'" % (name, regexp)
+                    continue
+
+            # We found a match for our test case.  Add it to the suite.
             if not sys.path.count(dir):
                 sys.path.append(dir)
             base = os.path.splitext(name)[0]

Modified: lldb/trunk/test/types/TestBasicTypes.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/types/TestBasicTypes.py?rev=114923&r1=114922&r2=114923&view=diff
==============================================================================
--- lldb/trunk/test/types/TestBasicTypes.py (original)
+++ lldb/trunk/test/types/TestBasicTypes.py Mon Sep 27 18:29:54 2010
@@ -1,211 +1,21 @@
 """
-Test that variables of integer basic types are displayed correctly.
+Abstract base class of basic types provides a generic type tester method.
 """
 
 import os, time
 import re
-import unittest2
 import lldb
 from lldbtest import *
 
 def Msg(var, val):
     return "'frame variable %s' matches the compiler's output: %s" % (var, val)
 
-class BasicTypesTestCase(TestBase):
-
-    mydir = "types"
+class AbstractBase(TestBase):
 
     # This is the pattern by design to match the " var = 'value'" output from
     # printf() stmts (see basic_type.cpp).
     pattern = re.compile(" (\*?a[^=]*) = '([^=]*)'$")
 
-    def test_char_type_with_dsym(self):
-        """Test that char-type variables are displayed correctly."""
-        d = {'CXX_SOURCES': 'char.cpp'}
-        self.buildDsym(dictionary=d)
-        self.setTearDownCleanup(dictionary=d)
-        self.char_type()
-
-    def test_char_type_with_dwarf(self):
-        """Test that char-type variables are displayed correctly."""
-        d = {'CXX_SOURCES': 'char.cpp'}
-        self.buildDwarf(dictionary=d)
-        self.setTearDownCleanup(dictionary=d)
-        self.char_type()
-
-    def test_unsigned_char_type_with_dsym(self):
-        """Test that 'unsigned_char'-type variables are displayed correctly."""
-        d = {'CXX_SOURCES': 'unsigned_char.cpp'}
-        self.buildDsym(dictionary=d)
-        self.setTearDownCleanup(dictionary=d)
-        self.unsigned_char_type()
-
-    def test_unsigned_char_type_with_dwarf(self):
-        """Test that 'unsigned char'-type variables are displayed correctly."""
-        d = {'CXX_SOURCES': 'unsigned_char.cpp'}
-        self.buildDwarf(dictionary=d)
-        self.setTearDownCleanup(dictionary=d)
-        self.unsigned_char_type()
-
-    def test_short_type_with_dsym(self):
-        """Test that short-type variables are displayed correctly."""
-        d = {'CXX_SOURCES': 'short.cpp'}
-        self.buildDsym(dictionary=d)
-        self.setTearDownCleanup(dictionary=d)
-        self.short_type()
-
-    def test_short_type_with_dwarf(self):
-        """Test that short-type variables are displayed correctly."""
-        d = {'CXX_SOURCES': 'short.cpp'}
-        self.buildDwarf(dictionary=d)
-        self.setTearDownCleanup(dictionary=d)
-        self.short_type()
-
-    def test_unsigned_short_type_with_dsym(self):
-        """Test that 'unsigned_short'-type variables are displayed correctly."""
-        d = {'CXX_SOURCES': 'unsigned_short.cpp'}
-        self.buildDsym(dictionary=d)
-        self.setTearDownCleanup(dictionary=d)
-        self.unsigned_short_type()
-
-    def test_unsigned_short_type_with_dwarf(self):
-        """Test that 'unsigned short'-type variables are displayed correctly."""
-        d = {'CXX_SOURCES': 'unsigned_short.cpp'}
-        self.buildDwarf(dictionary=d)
-        self.setTearDownCleanup(dictionary=d)
-        self.unsigned_short_type()
-
-    def test_int_type_with_dsym(self):
-        """Test that int-type variables are displayed correctly."""
-        d = {'CXX_SOURCES': 'int.cpp'}
-        self.buildDsym(dictionary=d)
-        self.setTearDownCleanup(dictionary=d)
-        self.int_type()
-
-    def test_int_type_with_dwarf(self):
-        """Test that int-type variables are displayed correctly."""
-        d = {'CXX_SOURCES': 'int.cpp'}
-        self.buildDwarf(dictionary=d)
-        self.setTearDownCleanup(dictionary=d)
-        self.int_type()
-
-    def test_unsigned_int_type_with_dsym(self):
-        """Test that 'unsigned_int'-type variables are displayed correctly."""
-        d = {'CXX_SOURCES': 'unsigned_int.cpp'}
-        self.buildDsym(dictionary=d)
-        self.setTearDownCleanup(dictionary=d)
-        self.unsigned_int_type()
-
-    def test_unsigned_int_type_with_dwarf(self):
-        """Test that 'unsigned int'-type variables are displayed correctly."""
-        d = {'CXX_SOURCES': 'unsigned_int.cpp'}
-        self.buildDwarf(dictionary=d)
-        self.setTearDownCleanup(dictionary=d)
-        self.unsigned_int_type()
-
-    def test_long_type_with_dsym(self):
-        """Test that long-type variables are displayed correctly."""
-        d = {'CXX_SOURCES': 'long.cpp'}
-        self.buildDsym(dictionary=d)
-        self.setTearDownCleanup(dictionary=d)
-        self.long_type()
-
-    def test_long_type_with_dwarf(self):
-        """Test that long-type variables are displayed correctly."""
-        d = {'CXX_SOURCES': 'long.cpp'}
-        self.buildDwarf(dictionary=d)
-        self.setTearDownCleanup(dictionary=d)
-        self.long_type()
-
-    def test_unsigned_long_type_with_dsym(self):
-        """Test that 'unsigned long'-type variables are displayed correctly."""
-        d = {'CXX_SOURCES': 'unsigned_long.cpp'}
-        self.buildDsym(dictionary=d)
-        self.setTearDownCleanup(dictionary=d)
-        self.unsigned_long_type()
-
-    def test_unsigned_long_type_with_dwarf(self):
-        """Test that 'unsigned long'-type variables are displayed correctly."""
-        d = {'CXX_SOURCES': 'unsigned_long.cpp'}
-        self.buildDwarf(dictionary=d)
-        self.setTearDownCleanup(dictionary=d)
-        self.unsigned_long_type()
-
-    # rdar://problem/8482903
-    # test suite failure for types dir -- "long long" and "unsigned long long"
-
-    @unittest2.expectedFailure
-    def test_long_long_type_with_dsym(self):
-        """Test that 'long long'-type variables are displayed correctly."""
-        d = {'CXX_SOURCES': 'long_long.cpp'}
-        self.buildDsym(dictionary=d)
-        self.setTearDownCleanup(dictionary=d)
-        self.long_long_type()
-
-    @unittest2.expectedFailure
-    def test_long_long_type_with_dwarf(self):
-        """Test that 'long long'-type variables are displayed correctly."""
-        d = {'CXX_SOURCES': 'long_long.cpp'}
-        self.buildDwarf(dictionary=d)
-        self.setTearDownCleanup(dictionary=d)
-        self.long_long_type()
-
-    @unittest2.expectedFailure
-    def test_unsigned_long_long_type_with_dsym(self):
-        """Test that 'unsigned long long'-type variables are displayed correctly."""
-        d = {'CXX_SOURCES': 'unsigned_long_long.cpp'}
-        self.buildDsym(dictionary=d)
-        self.setTearDownCleanup(dictionary=d)
-        self.unsigned_long_long_type()
-
-    @unittest2.expectedFailure
-    def test_unsigned_long_long_type_with_dwarf(self):
-        """Test that 'unsigned long long'-type variables are displayed correctly."""
-        d = {'CXX_SOURCES': 'unsigned_long_long.cpp'}
-        self.buildDwarf(dictionary=d)
-        self.setTearDownCleanup(dictionary=d)
-        self.unsigned_long_long_type()
-
-    def char_type(self):
-        """Test that char-type variables are displayed correctly."""
-        self.generic_type_tester(set(['char']), quotedDisplay=True)
-
-    def unsigned_char_type(self):
-        """Test that 'unsigned char'-type variables are displayed correctly."""
-        self.generic_type_tester(set(['unsigned', 'char']), quotedDisplay=True)
-
-    def short_type(self):
-        """Test that short-type variables are displayed correctly."""
-        self.generic_type_tester(set(['short']))
-
-    def unsigned_short_type(self):
-        """Test that 'unsigned short'-type variables are displayed correctly."""
-        self.generic_type_tester(set(['unsigned', 'short']))
-
-    def int_type(self):
-        """Test that int-type variables are displayed correctly."""
-        self.generic_type_tester(set(['int']))
-
-    def unsigned_int_type(self):
-        """Test that 'unsigned int'-type variables are displayed correctly."""
-        self.generic_type_tester(set(['unsigned', 'int']))
-
-    def long_type(self):
-        """Test that long-type variables are displayed correctly."""
-        self.generic_type_tester(set(['long']))
-
-    def unsigned_long_type(self):
-        """Test that 'unsigned long'-type variables are displayed correctly."""
-        self.generic_type_tester(set(['unsigned', 'long']))
-
-    def long_long_type(self):
-        """Test that long long-type variables are displayed correctly."""
-        self.generic_type_tester(set(['long long']))
-
-    def unsigned_long_long_type(self):
-        """Test that 'unsigned long long'-type variables are displayed correctly."""
-        self.generic_type_tester(set(['unsigned', 'long long']))
-
     def generic_type_tester(self, atoms, quotedDisplay=False):
         """Test that variables with basic types are displayed correctly."""
 
@@ -275,10 +85,3 @@
             nv = (" %s = '%s'" if quotedDisplay else " %s = %s") % (var, val)
             self.expect(output, Msg(var, val), exe=False,
                 substrs = [nv])
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Added: lldb/trunk/test/types/TestFloatTypes.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/types/TestFloatTypes.py?rev=114923&view=auto
==============================================================================
--- lldb/trunk/test/types/TestFloatTypes.py (added)
+++ lldb/trunk/test/types/TestFloatTypes.py Mon Sep 27 18:29:54 2010
@@ -0,0 +1,54 @@
+"""
+Test that variables of floating point types are displayed correctly.
+"""
+
+import TestBasicTypes
+import unittest2
+import lldb
+
+class FloatTypesTestCase(TestBasicTypes.AbstractBase):
+
+    mydir = "types"
+
+    def test_float_types_with_dsym(self):
+        """Test that float-type variables are displayed correctly."""
+        d = {'CXX_SOURCES': 'float.cpp'}
+        self.buildDsym(dictionary=d)
+        self.setTearDownCleanup(dictionary=d)
+        self.float_type()
+
+    def test_float_type_with_dwarf(self):
+        """Test that float-type variables are displayed correctly."""
+        d = {'CXX_SOURCES': 'float.cpp'}
+        self.buildDwarf(dictionary=d)
+        self.setTearDownCleanup(dictionary=d)
+        self.float_type()
+
+    def test_double_type_with_dsym(self):
+        """Test that double-type variables are displayed correctly."""
+        d = {'CXX_SOURCES': 'double.cpp'}
+        self.buildDsym(dictionary=d)
+        self.setTearDownCleanup(dictionary=d)
+        self.double_type()
+
+    def test_double_type_with_dwarf(self):
+        """Test that double-type variables are displayed correctly."""
+        d = {'CXX_SOURCES': 'double.cpp'}
+        self.buildDwarf(dictionary=d)
+        self.setTearDownCleanup(dictionary=d)
+        self.double_type()
+
+    def float_type(self):
+        """Test that float-type variables are displayed correctly."""
+        self.generic_type_tester(set(['float']))
+
+    def double_type(self):
+        """Test that double-type variables are displayed correctly."""
+        self.generic_type_tester(set(['double']))
+
+
+if __name__ == '__main__':
+    import atexit
+    lldb.SBDebugger.Initialize()
+    atexit.register(lambda: lldb.SBDebugger.Terminate())
+    unittest2.main()

Added: lldb/trunk/test/types/TestIntegerTypes.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/types/TestIntegerTypes.py?rev=114923&view=auto
==============================================================================
--- lldb/trunk/test/types/TestIntegerTypes.py (added)
+++ lldb/trunk/test/types/TestIntegerTypes.py Mon Sep 27 18:29:54 2010
@@ -0,0 +1,205 @@
+"""
+Test that variables of integer basic types are displayed correctly.
+"""
+
+import TestBasicTypes
+import unittest2
+import lldb
+
+class IntegerTypesTestCase(TestBasicTypes.AbstractBase):
+
+    mydir = "types"
+
+    def test_char_type_with_dsym(self):
+        """Test that char-type variables are displayed correctly."""
+        d = {'CXX_SOURCES': 'char.cpp'}
+        self.buildDsym(dictionary=d)
+        self.setTearDownCleanup(dictionary=d)
+        self.char_type()
+
+    def test_char_type_with_dwarf(self):
+        """Test that char-type variables are displayed correctly."""
+        d = {'CXX_SOURCES': 'char.cpp'}
+        self.buildDwarf(dictionary=d)
+        self.setTearDownCleanup(dictionary=d)
+        self.char_type()
+
+    def test_unsigned_char_type_with_dsym(self):
+        """Test that 'unsigned_char'-type variables are displayed correctly."""
+        d = {'CXX_SOURCES': 'unsigned_char.cpp'}
+        self.buildDsym(dictionary=d)
+        self.setTearDownCleanup(dictionary=d)
+        self.unsigned_char_type()
+
+    def test_unsigned_char_type_with_dwarf(self):
+        """Test that 'unsigned char'-type variables are displayed correctly."""
+        d = {'CXX_SOURCES': 'unsigned_char.cpp'}
+        self.buildDwarf(dictionary=d)
+        self.setTearDownCleanup(dictionary=d)
+        self.unsigned_char_type()
+
+    def test_short_type_with_dsym(self):
+        """Test that short-type variables are displayed correctly."""
+        d = {'CXX_SOURCES': 'short.cpp'}
+        self.buildDsym(dictionary=d)
+        self.setTearDownCleanup(dictionary=d)
+        self.short_type()
+
+    def test_short_type_with_dwarf(self):
+        """Test that short-type variables are displayed correctly."""
+        d = {'CXX_SOURCES': 'short.cpp'}
+        self.buildDwarf(dictionary=d)
+        self.setTearDownCleanup(dictionary=d)
+        self.short_type()
+
+    def test_unsigned_short_type_with_dsym(self):
+        """Test that 'unsigned_short'-type variables are displayed correctly."""
+        d = {'CXX_SOURCES': 'unsigned_short.cpp'}
+        self.buildDsym(dictionary=d)
+        self.setTearDownCleanup(dictionary=d)
+        self.unsigned_short_type()
+
+    def test_unsigned_short_type_with_dwarf(self):
+        """Test that 'unsigned short'-type variables are displayed correctly."""
+        d = {'CXX_SOURCES': 'unsigned_short.cpp'}
+        self.buildDwarf(dictionary=d)
+        self.setTearDownCleanup(dictionary=d)
+        self.unsigned_short_type()
+
+    def test_int_type_with_dsym(self):
+        """Test that int-type variables are displayed correctly."""
+        d = {'CXX_SOURCES': 'int.cpp'}
+        self.buildDsym(dictionary=d)
+        self.setTearDownCleanup(dictionary=d)
+        self.int_type()
+
+    def test_int_type_with_dwarf(self):
+        """Test that int-type variables are displayed correctly."""
+        d = {'CXX_SOURCES': 'int.cpp'}
+        self.buildDwarf(dictionary=d)
+        self.setTearDownCleanup(dictionary=d)
+        self.int_type()
+
+    def test_unsigned_int_type_with_dsym(self):
+        """Test that 'unsigned_int'-type variables are displayed correctly."""
+        d = {'CXX_SOURCES': 'unsigned_int.cpp'}
+        self.buildDsym(dictionary=d)
+        self.setTearDownCleanup(dictionary=d)
+        self.unsigned_int_type()
+
+    def test_unsigned_int_type_with_dwarf(self):
+        """Test that 'unsigned int'-type variables are displayed correctly."""
+        d = {'CXX_SOURCES': 'unsigned_int.cpp'}
+        self.buildDwarf(dictionary=d)
+        self.setTearDownCleanup(dictionary=d)
+        self.unsigned_int_type()
+
+    def test_long_type_with_dsym(self):
+        """Test that long-type variables are displayed correctly."""
+        d = {'CXX_SOURCES': 'long.cpp'}
+        self.buildDsym(dictionary=d)
+        self.setTearDownCleanup(dictionary=d)
+        self.long_type()
+
+    def test_long_type_with_dwarf(self):
+        """Test that long-type variables are displayed correctly."""
+        d = {'CXX_SOURCES': 'long.cpp'}
+        self.buildDwarf(dictionary=d)
+        self.setTearDownCleanup(dictionary=d)
+        self.long_type()
+
+    def test_unsigned_long_type_with_dsym(self):
+        """Test that 'unsigned long'-type variables are displayed correctly."""
+        d = {'CXX_SOURCES': 'unsigned_long.cpp'}
+        self.buildDsym(dictionary=d)
+        self.setTearDownCleanup(dictionary=d)
+        self.unsigned_long_type()
+
+    def test_unsigned_long_type_with_dwarf(self):
+        """Test that 'unsigned long'-type variables are displayed correctly."""
+        d = {'CXX_SOURCES': 'unsigned_long.cpp'}
+        self.buildDwarf(dictionary=d)
+        self.setTearDownCleanup(dictionary=d)
+        self.unsigned_long_type()
+
+    # rdar://problem/8482903
+    # test suite failure for types dir -- "long long" and "unsigned long long"
+
+    @unittest2.expectedFailure
+    def test_long_long_type_with_dsym(self):
+        """Test that 'long long'-type variables are displayed correctly."""
+        d = {'CXX_SOURCES': 'long_long.cpp'}
+        self.buildDsym(dictionary=d)
+        self.setTearDownCleanup(dictionary=d)
+        self.long_long_type()
+
+    @unittest2.expectedFailure
+    def test_long_long_type_with_dwarf(self):
+        """Test that 'long long'-type variables are displayed correctly."""
+        d = {'CXX_SOURCES': 'long_long.cpp'}
+        self.buildDwarf(dictionary=d)
+        self.setTearDownCleanup(dictionary=d)
+        self.long_long_type()
+
+    @unittest2.expectedFailure
+    def test_unsigned_long_long_type_with_dsym(self):
+        """Test that 'unsigned long long'-type variables are displayed correctly."""
+        d = {'CXX_SOURCES': 'unsigned_long_long.cpp'}
+        self.buildDsym(dictionary=d)
+        self.setTearDownCleanup(dictionary=d)
+        self.unsigned_long_long_type()
+
+    @unittest2.expectedFailure
+    def test_unsigned_long_long_type_with_dwarf(self):
+        """Test that 'unsigned long long'-type variables are displayed correctly."""
+        d = {'CXX_SOURCES': 'unsigned_long_long.cpp'}
+        self.buildDwarf(dictionary=d)
+        self.setTearDownCleanup(dictionary=d)
+        self.unsigned_long_long_type()
+
+    def char_type(self):
+        """Test that char-type variables are displayed correctly."""
+        self.generic_type_tester(set(['char']), quotedDisplay=True)
+
+    def unsigned_char_type(self):
+        """Test that 'unsigned char'-type variables are displayed correctly."""
+        self.generic_type_tester(set(['unsigned', 'char']), quotedDisplay=True)
+
+    def short_type(self):
+        """Test that short-type variables are displayed correctly."""
+        self.generic_type_tester(set(['short']))
+
+    def unsigned_short_type(self):
+        """Test that 'unsigned short'-type variables are displayed correctly."""
+        self.generic_type_tester(set(['unsigned', 'short']))
+
+    def int_type(self):
+        """Test that int-type variables are displayed correctly."""
+        self.generic_type_tester(set(['int']))
+
+    def unsigned_int_type(self):
+        """Test that 'unsigned int'-type variables are displayed correctly."""
+        self.generic_type_tester(set(['unsigned', 'int']))
+
+    def long_type(self):
+        """Test that long-type variables are displayed correctly."""
+        self.generic_type_tester(set(['long']))
+
+    def unsigned_long_type(self):
+        """Test that 'unsigned long'-type variables are displayed correctly."""
+        self.generic_type_tester(set(['unsigned', 'long']))
+
+    def long_long_type(self):
+        """Test that long long-type variables are displayed correctly."""
+        self.generic_type_tester(set(['long long']))
+
+    def unsigned_long_long_type(self):
+        """Test that 'unsigned long long'-type variables are displayed correctly."""
+        self.generic_type_tester(set(['unsigned', 'long long']))
+
+
+if __name__ == '__main__':
+    import atexit
+    lldb.SBDebugger.Initialize()
+    atexit.register(lambda: lldb.SBDebugger.Terminate())
+    unittest2.main()

Added: lldb/trunk/test/types/double.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/types/double.cpp?rev=114923&view=auto
==============================================================================
--- lldb/trunk/test/types/double.cpp (added)
+++ lldb/trunk/test/types/double.cpp Mon Sep 27 18:29:54 2010
@@ -0,0 +1,9 @@
+#define T double
+#define T_CSTR "double"
+#define T_VALUE_1 1100.125
+#define T_VALUE_2 2200.250
+#define T_VALUE_3 33.00
+#define T_VALUE_4 44.00
+#define T_PRINTF_FORMAT "%lg"
+
+#include "basic_type.cpp"

Added: lldb/trunk/test/types/float.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/types/float.cpp?rev=114923&view=auto
==============================================================================
--- lldb/trunk/test/types/float.cpp (added)
+++ lldb/trunk/test/types/float.cpp Mon Sep 27 18:29:54 2010
@@ -0,0 +1,9 @@
+#define T float
+#define T_CSTR "float"
+#define T_VALUE_1 1100.125
+#define T_VALUE_2 2200.250
+#define T_VALUE_3 33.00
+#define T_VALUE_4 44.00
+#define T_PRINTF_FORMAT "%g"
+
+#include "basic_type.cpp"





More information about the lldb-commits mailing list