private bool IsElementAcceptableType(VCCodeElement element) { switch (element.Kind) { case vsCMElement.vsCMElementFunction: VCCodeFunction function = (VCCodeFunction)element; if (element.Name.StartsWith("~") || function.Access != vsCMAccess.vsCMAccessPublic) { return(false); } else { return(true); } case vsCMElement.vsCMElementClass: VCCodeClass klass = (VCCodeClass)element; if (klass.Access != vsCMAccess.vsCMAccessPublic) { return(false); } else { return(true); } case vsCMElement.vsCMElementNamespace: return(true); case vsCMElement.vsCMElementStruct: VCCodeStruct strukt = (VCCodeStruct)element; if (strukt.Access != vsCMAccess.vsCMAccessPublic) { return(false); } else { return(true); } default: return(false); } }
private bool IsStructTestSuite(VCCodeStruct strukt) { foreach (VCCodeElement element in strukt.Bases) { if (Constants.CxxTestSuiteClassRegex.IsMatch(element.Name)) { currentSuite = new TestSuite(strukt); testSuites.Add(currentSuite); ProjectItem item = strukt.ProjectItem; if (item != null) { RemovePossibleTestFile(item); } return(true); } } return(false); }
// ------------------------------------------------------ /// <summary> /// Creates a new test suite based on the specified struct in the VC /// code model. /// </summary> /// <param name="testClass"> /// The VC code model struct object from which to create the test /// suite. /// </param> public TestSuite(VCCodeStruct testClass) { this.testClass = (VCCodeElement)testClass; Initialize(); }
private bool IsStructTestSuite(VCCodeStruct strukt) { foreach (VCCodeElement element in strukt.Bases) { if (Constants.CxxTestSuiteClassRegex.IsMatch(element.Name)) { currentSuite = new TestSuite(strukt); testSuites.Add(currentSuite); ProjectItem item = strukt.ProjectItem; if (item != null) RemovePossibleTestFile(item); return true; } } return false; }