mirror of
https://github.com/intel/llvm.git
synced 2026-01-20 10:58:11 +08:00
Add from __future__ import print_function everywhere.
Apparently there were tons of instances I missed last time, I guess I accidentally ran 2to3 non-recursively. This should be every occurrence of a print statement fixed to use a print function as well as from __future__ import print_function being added to every file. After this patch print statements will stop working everywhere in the test suite, and the print function should be used instead. llvm-svn: 251121
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
"""Test the SBData APIs."""
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
import lldb_shared
|
||||
|
||||
import os
|
||||
@@ -41,16 +43,16 @@ class SBDataAPICase(TestBase):
|
||||
|
||||
frame = thread.GetSelectedFrame()
|
||||
if self.TraceOn():
|
||||
print frame
|
||||
print(frame)
|
||||
foobar = frame.FindVariable('foobar')
|
||||
self.assertTrue(foobar.IsValid())
|
||||
if self.TraceOn():
|
||||
print foobar
|
||||
print(foobar)
|
||||
|
||||
data = foobar.GetPointeeData(0, 2)
|
||||
|
||||
if self.TraceOn():
|
||||
print data
|
||||
print(data)
|
||||
|
||||
offset = 0
|
||||
error = lldb.SBError()
|
||||
@@ -96,7 +98,7 @@ class SBDataAPICase(TestBase):
|
||||
data = star_foobar.GetData()
|
||||
|
||||
if self.TraceOn():
|
||||
print data
|
||||
print(data)
|
||||
|
||||
offset = 0
|
||||
self.assert_data(data.GetUnsignedInt32, offset, 1)
|
||||
@@ -114,12 +116,12 @@ class SBDataAPICase(TestBase):
|
||||
new_foobar = foobar.CreateValueFromAddress("f00", foobar_addr, star_foobar.GetType())
|
||||
self.assertTrue(new_foobar.IsValid())
|
||||
if self.TraceOn():
|
||||
print new_foobar
|
||||
print(new_foobar)
|
||||
|
||||
data = new_foobar.GetData()
|
||||
|
||||
if self.TraceOn():
|
||||
print data
|
||||
print(data)
|
||||
|
||||
self.assertTrue(data.uint32[0] == 8, 'then foo[1].a == 8')
|
||||
self.assertTrue(data.uint32[1] == 7, 'then foo[1].b == 7')
|
||||
@@ -138,7 +140,7 @@ class SBDataAPICase(TestBase):
|
||||
data = new_foobar.GetData()
|
||||
|
||||
if self.TraceOn():
|
||||
print data
|
||||
print(data)
|
||||
|
||||
offset = 0
|
||||
self.assert_data(data.GetUnsignedInt32, offset, 8)
|
||||
@@ -155,10 +157,10 @@ class SBDataAPICase(TestBase):
|
||||
data = barfoo.GetData()
|
||||
|
||||
if self.TraceOn():
|
||||
print barfoo
|
||||
print(barfoo)
|
||||
|
||||
if self.TraceOn():
|
||||
print data
|
||||
print(data)
|
||||
|
||||
offset = 0
|
||||
self.assert_data(data.GetUnsignedInt32, offset, 1)
|
||||
@@ -178,7 +180,7 @@ class SBDataAPICase(TestBase):
|
||||
new_object = barfoo.CreateValueFromData("new_object",data,barfoo.GetType().GetBasicType(lldb.eBasicTypeInt))
|
||||
|
||||
if self.TraceOn():
|
||||
print new_object
|
||||
print(new_object)
|
||||
|
||||
self.assertTrue(new_object.GetValue() == "1", 'new_object == 1')
|
||||
|
||||
@@ -192,7 +194,7 @@ class SBDataAPICase(TestBase):
|
||||
data.Append(data2)
|
||||
|
||||
if self.TraceOn():
|
||||
print data
|
||||
print(data)
|
||||
|
||||
# this breaks on EBCDIC
|
||||
offset = 0
|
||||
|
||||
Reference in New Issue
Block a user