summaryrefslogtreecommitdiffstats
path: root/lldb/test/lang/cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/test/lang/cpp')
-rw-r--r--lldb/test/lang/cpp/breakpoint-commands/TestCPPBreakpointCommands.py2
-rw-r--r--lldb/test/lang/cpp/char1632_t/TestChar1632T.py2
-rw-r--r--lldb/test/lang/cpp/class_static/TestStaticVariables.py2
-rw-r--r--lldb/test/lang/cpp/class_types/TestClassTypes.py2
-rw-r--r--lldb/test/lang/cpp/class_types/TestClassTypesDisassembly.py12
-rw-r--r--lldb/test/lang/cpp/dynamic-value/TestCppValueCast.py18
-rw-r--r--lldb/test/lang/cpp/dynamic-value/TestDynamicValue.py2
-rw-r--r--lldb/test/lang/cpp/enum_types/TestCPP11EnumTypes.py2
-rw-r--r--lldb/test/lang/cpp/exceptions/TestCPPExceptionBreakpoints.py2
-rw-r--r--lldb/test/lang/cpp/namespace/TestNamespace.py2
-rw-r--r--lldb/test/lang/cpp/rdar12991846/TestRdar12991846.py2
-rw-r--r--lldb/test/lang/cpp/signed_types/TestSignedTypes.py2
-rw-r--r--lldb/test/lang/cpp/static_members/TestCPPStaticMembers.py2
-rw-r--r--lldb/test/lang/cpp/stl/TestSTL.py2
-rw-r--r--lldb/test/lang/cpp/stl/TestStdCXXDisassembly.py8
-rw-r--r--lldb/test/lang/cpp/unique-types/TestUniqueTypes.py2
-rw-r--r--lldb/test/lang/cpp/unsigned_types/TestUnsignedTypes.py2
-rw-r--r--lldb/test/lang/cpp/virtual/TestVirtual.py4
-rw-r--r--lldb/test/lang/cpp/wchar_t/TestCxxWCharT.py2
19 files changed, 55 insertions, 17 deletions
diff --git a/lldb/test/lang/cpp/breakpoint-commands/TestCPPBreakpointCommands.py b/lldb/test/lang/cpp/breakpoint-commands/TestCPPBreakpointCommands.py
index 867bfed4d7f..72c01ad344d 100644
--- a/lldb/test/lang/cpp/breakpoint-commands/TestCPPBreakpointCommands.py
+++ b/lldb/test/lang/cpp/breakpoint-commands/TestCPPBreakpointCommands.py
@@ -2,6 +2,8 @@
Test lldb breakpoint command for CPP methods & functions in a namespace.
"""
+from __future__ import print_function
+
import lldb_shared
import os, time
diff --git a/lldb/test/lang/cpp/char1632_t/TestChar1632T.py b/lldb/test/lang/cpp/char1632_t/TestChar1632T.py
index 7392f79bce7..0e55babc91a 100644
--- a/lldb/test/lang/cpp/char1632_t/TestChar1632T.py
+++ b/lldb/test/lang/cpp/char1632_t/TestChar1632T.py
@@ -3,6 +3,8 @@
Test that the C++11 support for char16_t and char32_t works correctly.
"""
+from __future__ import print_function
+
import lldb_shared
import os, time
diff --git a/lldb/test/lang/cpp/class_static/TestStaticVariables.py b/lldb/test/lang/cpp/class_static/TestStaticVariables.py
index c9182fe69d7..ba770af9826 100644
--- a/lldb/test/lang/cpp/class_static/TestStaticVariables.py
+++ b/lldb/test/lang/cpp/class_static/TestStaticVariables.py
@@ -2,6 +2,8 @@
Test display and Python APIs on file and class static variables.
"""
+from __future__ import print_function
+
import lldb_shared
import os, time
diff --git a/lldb/test/lang/cpp/class_types/TestClassTypes.py b/lldb/test/lang/cpp/class_types/TestClassTypes.py
index 6d737e04c99..9a46f5df36f 100644
--- a/lldb/test/lang/cpp/class_types/TestClassTypes.py
+++ b/lldb/test/lang/cpp/class_types/TestClassTypes.py
@@ -1,5 +1,7 @@
"""Test breakpoint on a class constructor; and variable list the this object."""
+from __future__ import print_function
+
import lldb_shared
import os, time
diff --git a/lldb/test/lang/cpp/class_types/TestClassTypesDisassembly.py b/lldb/test/lang/cpp/class_types/TestClassTypesDisassembly.py
index 031c2b352e9..f9e0f5fcd9c 100644
--- a/lldb/test/lang/cpp/class_types/TestClassTypesDisassembly.py
+++ b/lldb/test/lang/cpp/class_types/TestClassTypesDisassembly.py
@@ -2,6 +2,8 @@
Test the lldb disassemble command on each call frame when stopped on C's ctor.
"""
+from __future__ import print_function
+
import lldb_shared
import os, time
@@ -30,8 +32,8 @@ class IterateFrameAndDisassembleTestCase(TestBase):
match = frameRE.search(line)
if match:
function = match.group(1)
- #print "line:", line
- #print "function:", function
+ #print("line:", line)
+ #print("function:", function)
self.runCmd("disassemble -n '%s'" % function)
@python_api_test
@@ -51,8 +53,8 @@ class IterateFrameAndDisassembleTestCase(TestBase):
function = frame.GetFunction()
# Print the function header.
if self.TraceOn():
- print
- print function
+ print()
+ print(function)
if function:
# Get all instructions for this function and print them out.
insts = function.GetInstructions(target)
@@ -61,7 +63,7 @@ class IterateFrameAndDisassembleTestCase(TestBase):
# But we want to print to stdout only if self.TraceOn() is True.
disasm = str(inst)
if self.TraceOn():
- print disasm
+ print(disasm)
def setUp(self):
# Call super's setUp().
diff --git a/lldb/test/lang/cpp/dynamic-value/TestCppValueCast.py b/lldb/test/lang/cpp/dynamic-value/TestCppValueCast.py
index f46bad7dd9c..4d620a90725 100644
--- a/lldb/test/lang/cpp/dynamic-value/TestCppValueCast.py
+++ b/lldb/test/lang/cpp/dynamic-value/TestCppValueCast.py
@@ -2,6 +2,8 @@
Test lldb Python API SBValue::Cast(SBType) for C++ types.
"""
+from __future__ import print_function
+
import lldb_shared
import unittest2
@@ -81,8 +83,8 @@ class CppValueCastTestCase(TestBase):
if self.TraceOn():
for child in tellerA:
- print "child name:", child.GetName()
- print child
+ print("child name:", child.GetName())
+ print(child)
# Call SBValue.Cast() to obtain instanceA.
instanceA = tellerA.Cast(typeA.GetPointerType())
@@ -91,8 +93,8 @@ class CppValueCastTestCase(TestBase):
# Iterate through all the children and print their values.
if self.TraceOn():
for child in instanceA:
- print "child name:", child.GetName()
- print child
+ print("child name:", child.GetName())
+ print(child)
a_member_val = instanceA.GetChildMemberWithName('m_a_val')
self.DebugSBValue(a_member_val)
self.assertTrue(a_member_val.GetValueAsUnsigned(error, 0) == 10)
@@ -109,8 +111,8 @@ class CppValueCastTestCase(TestBase):
if self.TraceOn():
for child in tellerB:
- print "child name:", child.GetName()
- print child
+ print("child name:", child.GetName())
+ print(child)
# Call SBValue.Cast() to obtain instanceB.
instanceB = tellerB.Cast(typeB.GetPointerType())
@@ -119,8 +121,8 @@ class CppValueCastTestCase(TestBase):
# Iterate through all the children and print their values.
if self.TraceOn():
for child in instanceB:
- print "child name:", child.GetName()
- print child
+ print("child name:", child.GetName())
+ print(child)
b_member_val = instanceB.GetChildMemberWithName('m_b_val')
self.DebugSBValue(b_member_val)
self.assertTrue(b_member_val.GetValueAsUnsigned(error, 0) == 36)
diff --git a/lldb/test/lang/cpp/dynamic-value/TestDynamicValue.py b/lldb/test/lang/cpp/dynamic-value/TestDynamicValue.py
index 3ef4193a917..7095e42721c 100644
--- a/lldb/test/lang/cpp/dynamic-value/TestDynamicValue.py
+++ b/lldb/test/lang/cpp/dynamic-value/TestDynamicValue.py
@@ -2,6 +2,8 @@
Use lldb Python API to test dynamic values in C++
"""
+from __future__ import print_function
+
import lldb_shared
import os, time
diff --git a/lldb/test/lang/cpp/enum_types/TestCPP11EnumTypes.py b/lldb/test/lang/cpp/enum_types/TestCPP11EnumTypes.py
index c0fb3103892..a31519ffc19 100644
--- a/lldb/test/lang/cpp/enum_types/TestCPP11EnumTypes.py
+++ b/lldb/test/lang/cpp/enum_types/TestCPP11EnumTypes.py
@@ -1,5 +1,7 @@
"""Look up enum type information and check for correct display."""
+from __future__ import print_function
+
import lldb_shared
import os, time
diff --git a/lldb/test/lang/cpp/exceptions/TestCPPExceptionBreakpoints.py b/lldb/test/lang/cpp/exceptions/TestCPPExceptionBreakpoints.py
index 51135c7a0a1..babe4f2f98a 100644
--- a/lldb/test/lang/cpp/exceptions/TestCPPExceptionBreakpoints.py
+++ b/lldb/test/lang/cpp/exceptions/TestCPPExceptionBreakpoints.py
@@ -2,6 +2,8 @@
Test lldb exception breakpoint command for CPP.
"""
+from __future__ import print_function
+
import lldb_shared
import os, time
diff --git a/lldb/test/lang/cpp/namespace/TestNamespace.py b/lldb/test/lang/cpp/namespace/TestNamespace.py
index 08825c41af5..40f12988cb5 100644
--- a/lldb/test/lang/cpp/namespace/TestNamespace.py
+++ b/lldb/test/lang/cpp/namespace/TestNamespace.py
@@ -2,6 +2,8 @@
Test the printing of anonymous and named namespace variables.
"""
+from __future__ import print_function
+
import lldb_shared
import os, time
diff --git a/lldb/test/lang/cpp/rdar12991846/TestRdar12991846.py b/lldb/test/lang/cpp/rdar12991846/TestRdar12991846.py
index 4ac48e1866b..df1b5acb737 100644
--- a/lldb/test/lang/cpp/rdar12991846/TestRdar12991846.py
+++ b/lldb/test/lang/cpp/rdar12991846/TestRdar12991846.py
@@ -3,6 +3,8 @@
Test that the expression parser returns proper Unicode strings.
"""
+from __future__ import print_function
+
import lldb_shared
import unittest2
diff --git a/lldb/test/lang/cpp/signed_types/TestSignedTypes.py b/lldb/test/lang/cpp/signed_types/TestSignedTypes.py
index 8ae2e22c52b..5bac76e7020 100644
--- a/lldb/test/lang/cpp/signed_types/TestSignedTypes.py
+++ b/lldb/test/lang/cpp/signed_types/TestSignedTypes.py
@@ -2,6 +2,8 @@
Test that variables with signed types display correctly.
"""
+from __future__ import print_function
+
import lldb_shared
import os, time
diff --git a/lldb/test/lang/cpp/static_members/TestCPPStaticMembers.py b/lldb/test/lang/cpp/static_members/TestCPPStaticMembers.py
index f221a1a5bb1..aaf16d3a049 100644
--- a/lldb/test/lang/cpp/static_members/TestCPPStaticMembers.py
+++ b/lldb/test/lang/cpp/static_members/TestCPPStaticMembers.py
@@ -2,6 +2,8 @@
Tests that C++ member and static variables have correct layout and scope.
"""
+from __future__ import print_function
+
import lldb_shared
import unittest2
diff --git a/lldb/test/lang/cpp/stl/TestSTL.py b/lldb/test/lang/cpp/stl/TestSTL.py
index e32652602f8..66a8dce143f 100644
--- a/lldb/test/lang/cpp/stl/TestSTL.py
+++ b/lldb/test/lang/cpp/stl/TestSTL.py
@@ -2,6 +2,8 @@
Test some expressions involving STL data types.
"""
+from __future__ import print_function
+
import lldb_shared
import unittest2
diff --git a/lldb/test/lang/cpp/stl/TestStdCXXDisassembly.py b/lldb/test/lang/cpp/stl/TestStdCXXDisassembly.py
index dad5bf21eca..1ffb7652849 100644
--- a/lldb/test/lang/cpp/stl/TestStdCXXDisassembly.py
+++ b/lldb/test/lang/cpp/stl/TestStdCXXDisassembly.py
@@ -2,6 +2,8 @@
Test the lldb disassemble command on lib stdc++.
"""
+from __future__ import print_function
+
import lldb_shared
import unittest2
@@ -96,9 +98,9 @@ class StdCXXDisassembleTestCase(TestBase):
if match:
LA = match.group(1)
if self.TraceOn():
- print "line:", line
- print "load address:", LA
- print "SA:", SA
+ print("line:", line)
+ print("load address:", LA)
+ print("SA:", SA)
if SA and LA:
if int(LA, 16) > int(SA, 16):
self.runCmd("disassemble -s %s -e %s" % (SA, LA))
diff --git a/lldb/test/lang/cpp/unique-types/TestUniqueTypes.py b/lldb/test/lang/cpp/unique-types/TestUniqueTypes.py
index a1c9f25d31b..9ac570e67b0 100644
--- a/lldb/test/lang/cpp/unique-types/TestUniqueTypes.py
+++ b/lldb/test/lang/cpp/unique-types/TestUniqueTypes.py
@@ -2,6 +2,8 @@
Test that template instaniations of std::vector<long> and <short> in the same module have the correct types.
"""
+from __future__ import print_function
+
import lldb_shared
import lldb
diff --git a/lldb/test/lang/cpp/unsigned_types/TestUnsignedTypes.py b/lldb/test/lang/cpp/unsigned_types/TestUnsignedTypes.py
index a2c8ff75f04..9154cc696c6 100644
--- a/lldb/test/lang/cpp/unsigned_types/TestUnsignedTypes.py
+++ b/lldb/test/lang/cpp/unsigned_types/TestUnsignedTypes.py
@@ -2,6 +2,8 @@
Test that variables with unsigned types display correctly.
"""
+from __future__ import print_function
+
import lldb_shared
import os, time
diff --git a/lldb/test/lang/cpp/virtual/TestVirtual.py b/lldb/test/lang/cpp/virtual/TestVirtual.py
index 0904cfc0c83..6863c071056 100644
--- a/lldb/test/lang/cpp/virtual/TestVirtual.py
+++ b/lldb/test/lang/cpp/virtual/TestVirtual.py
@@ -2,6 +2,8 @@
Test C++ virtual function and virtual inheritance.
"""
+from __future__ import print_function
+
import os, time
import re
import lldb
@@ -71,7 +73,7 @@ class CppVirtualMadness(TestBase):
if match:
my_expr, val = match.group(1), match.group(2)
gl.append((my_expr, val))
- #print "golden list:", gl
+ #print("golden list:", gl)
# Now iterate through the golden list, comparing against the output from
# 'expression var'.
diff --git a/lldb/test/lang/cpp/wchar_t/TestCxxWCharT.py b/lldb/test/lang/cpp/wchar_t/TestCxxWCharT.py
index d2b3ab91ba3..70cc028bf2d 100644
--- a/lldb/test/lang/cpp/wchar_t/TestCxxWCharT.py
+++ b/lldb/test/lang/cpp/wchar_t/TestCxxWCharT.py
@@ -3,6 +3,8 @@
Test that C++ supports wchar_t correctly.
"""
+from __future__ import print_function
+
import lldb_shared
import os, time
OpenPOWER on IntegriCloud