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
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)
// 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;
};
};
};
};
-namespace b {
+namespace nsp_b {
struct namespace_only {
int b;
};
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