Ejemplo n.º 1
0
        private bool MarkCoverage(bool inheritCoverage, SourceLocation start, SourceLocation end, bool isCovered)
        {
            bool             covered;
            int              line = start.Line;
            CoverageLineInfo info;

            if (!CurScope.Lines.TryGetValue(line, out info))
            {
                CurScope.Lines[line] = info = new CoverageLineInfo();
            }

            info.Covered     = covered = inheritCoverage && (_blockCovered ?? false) || isCovered;
            info.ColumnStart = Math.Min(info.ColumnStart, start.Column);
            info.ColumnEnd   = Math.Max(info.ColumnEnd, end.Column);
            return(covered);
        }
Ejemplo n.º 2
0
        private bool MarkCoverage(bool inheritCoverage, SourceLocation start, SourceLocation end, bool isCovered) {
            bool covered;
            int line = start.Line;
            CoverageLineInfo info;
            if (!CurScope.Lines.TryGetValue(line, out info)) {
                CurScope.Lines[line] = info = new CoverageLineInfo();
            }

            info.Covered = covered = inheritCoverage && (_blockCovered ?? false) || isCovered;
            info.ColumnStart = Math.Min(info.ColumnStart, start.Column);
            info.ColumnEnd = Math.Max(info.ColumnEnd, end.Column);
            return covered;
        }