summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/lang/cpp
diff options
context:
space:
mode:
authorPavel Labath <labath@google.com>2018-03-01 16:56:28 +0000
committerPavel Labath <labath@google.com>2018-03-01 16:56:28 +0000
commite1463ef4d38126a417e7b5662a8c5c8ec3957d73 (patch)
tree6d1ba2a64237142637b3aec388d8626237efb22e /lldb/packages/Python/lldbsuite/test/lang/cpp
parentd696e93cb610f688acb19e142aa6adb94da3dc97 (diff)
downloadbcm5719-llvm-e1463ef4d38126a417e7b5662a8c5c8ec3957d73.tar.gz
bcm5719-llvm-e1463ef4d38126a417e7b5662a8c5c8ec3957d73.zip
Make TestDynamicValueSameBase gcc-compatible
gcc will say that the type of "this" is "T * const", clang "T *". Compare the unqualified type names to erase the difference between the two, as the constness is not a part of this test. FWIW, I think that the gcc behavior makes more sense here. llvm-svn: 326449
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/lang/cpp')
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/cpp/dynamic-value-same-basename/TestDynamicValueSameBase.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/lang/cpp/dynamic-value-same-basename/TestDynamicValueSameBase.py b/lldb/packages/Python/lldbsuite/test/lang/cpp/dynamic-value-same-basename/TestDynamicValueSameBase.py
index 83b20438584..358b3b2d93a 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/cpp/dynamic-value-same-basename/TestDynamicValueSameBase.py
+++ b/lldb/packages/Python/lldbsuite/test/lang/cpp/dynamic-value-same-basename/TestDynamicValueSameBase.py
@@ -14,7 +14,7 @@ import lldbsuite.test.lldbutil as lldbutil
from lldbsuite.test.lldbtest import *
-class RenameThisSampleTestTestCase(TestBase):
+class DynamicValueSameBaseTestCase(TestBase):
mydir = TestBase.compute_mydir(__file__)
@@ -49,14 +49,18 @@ class RenameThisSampleTestTestCase(TestBase):
frame = threads[0].frame[0]
namesp_this = frame.FindVariable("this", lldb.eDynamicCanRunTarget)
- self.assertEqual(namesp_this.GetTypeName(), "namesp::Virtual *", "Didn't get the right dynamic type")
+ # Clang specifies the type of this as "T *", gcc as "T * const". This
+ # erases the difference.
+ namesp_type = namesp_this.GetType().GetUnqualifiedType()
+ self.assertEqual(namesp_type.GetName(), "namesp::Virtual *", "Didn't get the right dynamic type")
threads = lldbutil.continue_to_breakpoint(process, virtual_bkpt)
self.assertEqual(len(threads), 1, "Didn't stop at virtual breakpoint")
frame = threads[0].frame[0]
virtual_this = frame.FindVariable("this", lldb.eDynamicCanRunTarget)
- self.assertEqual(virtual_this.GetTypeName(), "Virtual *", "Didn't get the right dynamic type")
+ virtual_type = virtual_this.GetType().GetUnqualifiedType()
+ self.assertEqual(virtual_type.GetName(), "Virtual *", "Didn't get the right dynamic type")
OpenPOWER on IntegriCloud