diff --git a/lldb/test/API/lang/cpp/complete-type-check/TestCppIsTypeComplete.py b/lldb/test/API/lang/cpp/complete-type-check/TestCppIsTypeComplete.py index b596611b15f2f..81a8876743474 100644 --- a/lldb/test/API/lang/cpp/complete-type-check/TestCppIsTypeComplete.py +++ b/lldb/test/API/lang/cpp/complete-type-check/TestCppIsTypeComplete.py @@ -14,6 +14,11 @@ def assertComplete(self, typename): self.assertTrue(found_type.IsValid()) self.assertTrue(found_type.IsTypeComplete()) + def assertIsNotPresent(self, typename): + """ Asserts that the type with the given name is not found. """ + found_type = self.target().FindFirstType(typename) + self.assertFalse(found_type.IsValid()) + def assertCompleteWithVar(self, typename): """ Asserts that the type with the given name is complete. """ found_type = self.target().FindFirstType(typename) @@ -41,6 +46,7 @@ def test_forward_declarations(self): self.assertCompleteWithVar("DefinedClass") self.assertCompleteWithVar("DefinedClassTypedef") self.assertCompleteWithVar("DefinedTemplateClass") + self.assertIsNotPresent("DefinedTemplateClass") # Record types without a defining declaration are not complete. self.assertPointeeIncomplete("FwdClass *", "fwd_class")