diff options
Diffstat (limited to 'lldb/test/python_api')
-rw-r--r-- | lldb/test/python_api/module_section/TestModuleAndSection.py | 10 | ||||
-rw-r--r-- | lldb/test/python_api/sbdata/TestSBData.py | 7 | ||||
-rw-r--r-- | lldb/test/python_api/symbol-context/TestSymbolContext.py | 2 |
3 files changed, 10 insertions, 9 deletions
diff --git a/lldb/test/python_api/module_section/TestModuleAndSection.py b/lldb/test/python_api/module_section/TestModuleAndSection.py index 1ebe9d33433..f9562cbf490 100644 --- a/lldb/test/python_api/module_section/TestModuleAndSection.py +++ b/lldb/test/python_api/module_section/TestModuleAndSection.py @@ -43,7 +43,7 @@ class ModuleAndSectionAPIsTestCase(TestBase): # Get the executable module at index 0. exe_module = target.GetModuleAtIndex(0) - print "Exe module: %s" % repr(exe_module) + print "Exe module: %s" % str(exe_module) print "Number of sections: %d" % exe_module.GetNumSections() INDENT = ' ' * 4 INDENT2 = INDENT * 2 @@ -52,14 +52,14 @@ class ModuleAndSectionAPIsTestCase(TestBase): print INDENT + "Number of subsections: %d" % sec.GetNumSubSections() if sec.GetNumSubSections() == 0: for sym in exe_module.symbol_in_section_iter(sec): - print INDENT + repr(sym) + print INDENT + str(sym) print INDENT + "symbol type: %s" % symbol_type_to_str(sym.GetType()) else: for subsec in sec: - print INDENT + repr(subsec) + print INDENT + str(subsec) # Now print the symbols belonging to the subsection.... for sym in exe_module.symbol_in_section_iter(subsec): - print INDENT2 + repr(sym) + print INDENT2 + str(sym) print INDENT2 + "symbol type: %s" % symbol_type_to_str(sym.GetType()) def module_and_section_boundary_condition(self): @@ -80,7 +80,7 @@ class ModuleAndSectionAPIsTestCase(TestBase): # Get the executable module at index 0. exe_module = target.GetModuleAtIndex(0) - print "Exe module: %s" % repr(exe_module) + print "Exe module: %s" % str(exe_module) print "Number of sections: %d" % exe_module.GetNumSections() # Boundary condition testings. Should not crash lldb! diff --git a/lldb/test/python_api/sbdata/TestSBData.py b/lldb/test/python_api/sbdata/TestSBData.py index 9d5b5c06765..e9856d7b85e 100644 --- a/lldb/test/python_api/sbdata/TestSBData.py +++ b/lldb/test/python_api/sbdata/TestSBData.py @@ -53,9 +53,9 @@ class SBDataAPICase(TestBase): thread = process.GetThreadAtIndex(0) frame = thread.GetSelectedFrame() - + print frame foobar = frame.FindVariable('foobar') - + self.assertTrue(foobar.IsValid()) if self.TraceOn(): print foobar @@ -98,6 +98,7 @@ class SBDataAPICase(TestBase): self.assertTrue(data.GetUnsignedInt32(error, offset) == 0, 'do not read beyond end') star_foobar = foobar.Dereference() + self.assertTrue(star_foobar.IsValid()) data = star_foobar.GetData() @@ -118,7 +119,7 @@ class SBDataAPICase(TestBase): nothing = foobar.CreateValueFromAddress("nothing", foobar_addr, star_foobar.GetType().GetBasicType(lldb.eBasicTypeInvalid)) new_foobar = foobar.CreateValueFromAddress("f00", foobar_addr, star_foobar.GetType()) - + self.assertTrue(new_foobar.IsValid()) if self.TraceOn(): print new_foobar diff --git a/lldb/test/python_api/symbol-context/TestSymbolContext.py b/lldb/test/python_api/symbol-context/TestSymbolContext.py index b601920e10f..ad0a55b22f4 100644 --- a/lldb/test/python_api/symbol-context/TestSymbolContext.py +++ b/lldb/test/python_api/symbol-context/TestSymbolContext.py @@ -68,7 +68,7 @@ class SymbolContextAPITestCase(TestBase): substrs = [os.path.join(self.mydir, 'a.out')]) compileUnit = context.GetCompileUnit() - self.expect(repr(compileUnit), "The compile unit should match", exe=False, + self.expect(str(compileUnit), "The compile unit should match", exe=False, substrs = [os.path.join(self.mydir, 'main.c')]) function = context.GetFunction() |