Exemple #1
0
 public TestFuncEntry(bool in_isBoostFunc, TestGroupEntry testGroup, bool isTestDisabled)
 {
     IsBoostFunc    = in_isBoostFunc;
     TestFunction   = string.Empty;
     FileFullPath   = "";
     LineNum        = 0;
     IsTestDisabled = isTestDisabled;
     TestGroup      = testGroup;
 }
Exemple #2
0
        public Project()
        {
            SourceDirPath    = "<not set>";
            TargetDirPath    = "<not set>";
            FullExePath      = "<not set>";
            IsStartupProject = false;
            AppType          = AppType.NO_TEST_FOUND;
            var rootGroupEntry = new TestGroupEntry(false, string.Empty);

            TestGroups = new NodeList <TestGroupEntry>(rootGroupEntry);
            rootGroupEntry.NodeList = TestGroups;
        }
Exemple #3
0
        /// [parser_func_info]
        private void CreateTestFuncInfo(Project project, ParseInfo parseInfo, bool currentSuiteDisabled)
        {
            //Create test group path(s) if not existent
            bool isRoot            = true;
            var  currentParseNode  = parseInfo.GroupNode;
            var  currentTargetNode = project.TestGroups;

            while (true)
            {
                //Root may have different namings
                if (isRoot || parseInfo.GroupNode.Value == project.TestGroups.Value.Name)
                {
                    isRoot = false;
                    if (currentParseNode.HasChild())
                    {
                        var targetNode = currentTargetNode.Childs.FirstOrDefault(x => x.Value.Name == currentParseNode.Child.Value);
                        if (targetNode != null)
                        {
                            //target node exists - use as new seek point
                            currentTargetNode = targetNode;
                        }
                        else
                        {
                            //target not doesn't exist - create new
                            var newGroupEntry = new TestGroupEntry(project.AppType == AppType.BOOST, currentParseNode.Child.Value);
                            currentTargetNode      = currentTargetNode.AddChildNode(new NodeList <TestGroupEntry>(newGroupEntry));
                            newGroupEntry.NodeList = currentTargetNode;
                        }
                        currentParseNode = currentParseNode.Child;
                    }
                    else
                    {
                        //This is the end...
                        break;
                    }
                }
            }

            // Store the found test function description
            TestFuncEntry tf = new TestFuncEntry(project.AppType == AppType.BOOST, currentTargetNode.Value, parseInfo.BoostMacroDisabled || currentSuiteDisabled);

            tf.TestFunction   = parseInfo.description;
            tf.FileFullPath   = parseInfo.FileFullPath;
            tf.IsDataTestCase = parseInfo.IsDataTestCase;
            tf.LineNum        = parseInfo.GetLineNum();
            currentTargetNode.Value.testFuncs.Add(tf);

            WriteLine(3, "CreateTestFuncInfo: " + tf.TestFunction + " within group: " + tf.TestGroup.NodeList.GetPath()
                      + " file: " + tf.FileFullPath + " line: " + tf.LineNum);
        }
 public TestTreeViewItem(TreeViewItemBase parent, TestGroupEntry testGroupEntry)
     : base(parent)
 {
     this.TestGroupEntry = testGroupEntry;
 }