diff options
author | Kate Stone <katherine.stone@apple.com> | 2016-09-06 20:57:50 +0000 |
---|---|---|
committer | Kate Stone <katherine.stone@apple.com> | 2016-09-06 20:57:50 +0000 |
commit | b9c1b51e45b845debb76d8658edabca70ca56079 (patch) | |
tree | dfcb5a13ef2b014202340f47036da383eaee74aa /lldb/packages/Python/lldbsuite/test/lang/cpp/diamond/TestDiamond.py | |
parent | d5aa73376966339caad04013510626ec2e42c760 (diff) | |
download | bcm5719-llvm-b9c1b51e45b845debb76d8658edabca70ca56079.tar.gz bcm5719-llvm-b9c1b51e45b845debb76d8658edabca70ca56079.zip |
*** This commit represents a complete reformatting of the LLDB source code
*** to conform to clang-format’s LLVM style. This kind of mass change has
*** two obvious implications:
Firstly, merging this particular commit into a downstream fork may be a huge
effort. Alternatively, it may be worth merging all changes up to this commit,
performing the same reformatting operation locally, and then discarding the
merge for this particular commit. The commands used to accomplish this
reformatting were as follows (with current working directory as the root of
the repository):
find . \( -iname "*.c" -or -iname "*.cpp" -or -iname "*.h" -or -iname "*.mm" \) -exec clang-format -i {} +
find . -iname "*.py" -exec autopep8 --in-place --aggressive --aggressive {} + ;
The version of clang-format used was 3.9.0, and autopep8 was 1.2.4.
Secondly, “blame” style tools will generally point to this commit instead of
a meaningful prior commit. There are alternatives available that will attempt
to look through this change and find the appropriate prior commit. YMMV.
llvm-svn: 280751
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/lang/cpp/diamond/TestDiamond.py')
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/lang/cpp/diamond/TestDiamond.py | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/lang/cpp/diamond/TestDiamond.py b/lldb/packages/Python/lldbsuite/test/lang/cpp/diamond/TestDiamond.py index d525e12b31e..c6f9d85cd2c 100644 --- a/lldb/packages/Python/lldbsuite/test/lang/cpp/diamond/TestDiamond.py +++ b/lldb/packages/Python/lldbsuite/test/lang/cpp/diamond/TestDiamond.py @@ -5,22 +5,25 @@ import lldb from lldbsuite.test.lldbtest import * import lldbsuite.test.lldbutil as lldbutil + class CPPTestDiamondInheritance(TestBase): - + mydir = TestBase.compute_mydir(__file__) - + def test_with_run_command(self): """Test that virtual base classes work in when SBValue objects are used to explore the variable value""" self.build() exe = os.path.join(os.getcwd(), "a.out") - + target = self.dbg.CreateTarget(exe) self.assertTrue(target, VALID_TARGET) self.set_breakpoint(line_number('main.cpp', '// breakpoint 1')) self.set_breakpoint(line_number('main.cpp', '// breakpoint 2')) - process = target.LaunchSimple (None, None, self.get_process_working_directory()) + process = target.LaunchSimple( + None, None, self.get_process_working_directory()) self.assertTrue(process, PROCESS_IS_VALID) - thread = lldbutil.get_stopped_thread(process, lldb.eStopReasonBreakpoint) + thread = lldbutil.get_stopped_thread( + process, lldb.eStopReasonBreakpoint) self.assertIsNotNone(thread) frame = thread.GetFrameAtIndex(0) j1 = frame.FindVariable("j1") @@ -30,13 +33,19 @@ class CPPTestDiamondInheritance(TestBase): j1_Derived2_VBase = j1_Derived2.GetChildAtIndex(0) j1_Derived1_VBase_m_value = j1_Derived1_VBase.GetChildAtIndex(0) j1_Derived2_VBase_m_value = j1_Derived2_VBase.GetChildAtIndex(0) - self.assertTrue(j1_Derived1_VBase.GetLoadAddress() == j1_Derived2_VBase.GetLoadAddress(), "ensure virtual base class is the same between Derived1 and Derived2") - self.assertTrue(j1_Derived1_VBase_m_value.GetValueAsUnsigned(1) == j1_Derived2_VBase_m_value.GetValueAsUnsigned(2), "ensure m_value in VBase is the same") - self.assertTrue(frame.FindVariable("d").GetChildAtIndex(0).GetChildAtIndex(0).GetValueAsUnsigned(0) == 12345, "ensure Derived2 from j1 is correct"); + self.assertTrue( + j1_Derived1_VBase.GetLoadAddress() == j1_Derived2_VBase.GetLoadAddress(), + "ensure virtual base class is the same between Derived1 and Derived2") + self.assertTrue(j1_Derived1_VBase_m_value.GetValueAsUnsigned( + 1) == j1_Derived2_VBase_m_value.GetValueAsUnsigned(2), "ensure m_value in VBase is the same") + self.assertTrue(frame.FindVariable("d").GetChildAtIndex(0).GetChildAtIndex( + 0).GetValueAsUnsigned(0) == 12345, "ensure Derived2 from j1 is correct") thread.StepOver() - self.assertTrue(frame.FindVariable("d").GetChildAtIndex(0).GetChildAtIndex(0).GetValueAsUnsigned(0) == 12346, "ensure Derived2 from j2 is correct"); - + self.assertTrue(frame.FindVariable("d").GetChildAtIndex(0).GetChildAtIndex( + 0).GetValueAsUnsigned(0) == 12346, "ensure Derived2 from j2 is correct") + def set_breakpoint(self, line): # Some compilers (for example GCC 4.4.7 and 4.6.1) emit multiple locations for the statement with the ternary # operator in the test program, while others emit only 1. - lldbutil.run_break_set_by_file_and_line (self, "main.cpp", line, num_expected_locations=-1, loc_exact=False) + lldbutil.run_break_set_by_file_and_line( + self, "main.cpp", line, num_expected_locations=-1, loc_exact=False) |