Avoid using short identifiers in some tests

This applies the same workaround  as r321271 to other tests. The root
problem is that lldb finds an internal symbol with the same name in the
debug info of system libraries, and then fails to disambiguate between
the two.

llvm-svn: 341235
This commit is contained in:
Pavel Labath 2018-08-31 18:25:01 +00:00
parent 2aa8efc820
commit 332447f4b4
3 changed files with 21 additions and 21 deletions

View File

@ -107,7 +107,7 @@ class DataFormatterSynthValueTestCase(TestBase):
# check that an aptly defined synthetic provider does not affect
# one-lining
self.expect(
"expression struct S { myInt theInt{12}; }; S()",
"expression struct Struct { myInt theInt{12}; }; Struct()",
substrs=['(theInt = 12)'])
# check that we can use a synthetic value in a summary

View File

@ -52,23 +52,23 @@ class TestCppTypeLookup(TestBase):
self.assertTrue(expr_result.GetError().Fail(),
"'namespace_only' exists in namespace only")
# Make sure we can find the correct type in a namespace "a"
expr_result = frame.EvaluateExpression("*((a::namespace_only *)&i)")
# Make sure we can find the correct type in a namespace "nsp_a"
expr_result = frame.EvaluateExpression("*((nsp_a::namespace_only *)&i)")
self.check_value(expr_result, "a", 123)
# Make sure we can find the correct type in a namespace "b"
expr_result = frame.EvaluateExpression("*((b::namespace_only *)&i)")
# Make sure we can find the correct type in a namespace "nsp_b"
expr_result = frame.EvaluateExpression("*((nsp_b::namespace_only *)&i)")
self.check_value(expr_result, "b", 123)
# Make sure we can find the correct type in the root namespace
expr_result = frame.EvaluateExpression("*((namespace_and_file *)&i)")
self.check_value(expr_result, "ff", 123)
# Make sure we can find the correct type in a namespace "a"
# Make sure we can find the correct type in a namespace "nsp_a"
expr_result = frame.EvaluateExpression(
"*((a::namespace_and_file *)&i)")
"*((nsp_a::namespace_and_file *)&i)")
self.check_value(expr_result, "aa", 123)
# Make sure we can find the correct type in a namespace "b"
# Make sure we can find the correct type in a namespace "nsp_b"
expr_result = frame.EvaluateExpression(
"*((b::namespace_and_file *)&i)")
"*((nsp_b::namespace_and_file *)&i)")
self.check_value(expr_result, "bb", 123)
# Make sure we don't accidentally accept structures that exist only
@ -84,11 +84,11 @@ class TestCppTypeLookup(TestBase):
expr_result = frame.EvaluateExpression(
"*((contains_type::in_contains_type *)&i)")
self.check_value(expr_result, "fff", 123)
# Make sure we can find the correct type in a namespace "a"
# Make sure we can find the correct type in a namespace "nsp_a"
expr_result = frame.EvaluateExpression(
"*((a::contains_type::in_contains_type *)&i)")
"*((nsp_a::contains_type::in_contains_type *)&i)")
self.check_value(expr_result, "aaa", 123)
# Make sure we can find the correct type in a namespace "b"
# Make sure we can find the correct type in a namespace "nsp_b"
expr_result = frame.EvaluateExpression(
"*((b::contains_type::in_contains_type *)&i)")
"*((nsp_b::contains_type::in_contains_type *)&i)")
self.check_value(expr_result, "bbb", 123)

View File

@ -11,7 +11,7 @@
// levels in the code and test that we can properly locate these types with
// a varienty of different expressions.
namespace a {
namespace nsp_a {
struct namespace_only {
int a;
};
@ -24,7 +24,7 @@ namespace a {
};
};
};
namespace b {
namespace nsp_b {
struct namespace_only {
int b;
};
@ -50,12 +50,12 @@ struct contains_type {
int main (int argc, char const *argv[]) {
a::namespace_only a_namespace_only = { 1 };
a::namespace_and_file a_namespace_and_file = { 2 };
a::contains_type::in_contains_type a_in_contains_type = { 3 };
b::namespace_only b_namespace_only = { 11 };
b::namespace_and_file b_namespace_and_file = { 22 };
b::contains_type::in_contains_type b_in_contains_type = { 33 };
nsp_a::namespace_only a_namespace_only = { 1 };
nsp_a::namespace_and_file a_namespace_and_file = { 2 };
nsp_a::contains_type::in_contains_type a_in_contains_type = { 3 };
nsp_b::namespace_only b_namespace_only = { 11 };
nsp_b::namespace_and_file b_namespace_and_file = { 22 };
nsp_b::contains_type::in_contains_type b_in_contains_type = { 33 };
namespace_and_file file_namespace_and_file = { 44 };
contains_type::in_contains_type file_in_contains_type = { 55 };
int i = 123; // Provide an integer that can be used for casting