Fix MacOSX since "imported" and "Imported::imported" are ambiguous. Test that we can read the global when specified with the global namespace and test that we can read "Imported::imported" correctly. The commented out test should be testing for ambiguity when just "imported" is evaluated as an expression, but that doesn't work yet.

llvm-svn: 247764
This commit is contained in:
Greg Clayton 2015-09-16 00:42:50 +00:00
parent 36597fa128
commit 4947b21cb9
1 changed files with 9 additions and 2 deletions

View File

@ -85,8 +85,15 @@ class TestCppNsImport(TestBase):
test_result = frame.EvaluateExpression("not_imported")
self.assertTrue(test_result.IsValid() and test_result.GetValueAsSigned() == 35, "not_imported = 35")
test_result = frame.EvaluateExpression("imported")
self.assertTrue(test_result.IsValid() and test_result.GetValueAsSigned() == 99, "imported = 99")
# Disabled the "imported" test since it isn't valid. It should actually test for ambiguity
#test_result = frame.EvaluateExpression("imported")
#self.assertTrue(test_result.IsValid() and test_result.GetValueAsSigned() == 99, "imported = 99")
test_result = frame.EvaluateExpression("::imported")
self.assertTrue(test_result.IsValid() and test_result.GetValueAsSigned() == 89, "::imported = 89")
test_result = frame.EvaluateExpression("Imported::imported")
self.assertTrue(test_result.IsValid() and test_result.GetValueAsSigned() == 99, "Imported::imported = 99")
test_result = frame.EvaluateExpression("single")
self.assertTrue(test_result.IsValid() and test_result.GetValueAsSigned() == 3, "single = 3")