Options
All
  • Public
  • Public/Protected
  • All
Menu

Class BranchDetail

Branch Coverage Detail Data

An extension of {@link Detail | Detail} to hold detailed coverage data for branch statements.

Hierarchy

Implements

Index

Constructors

constructor

  • new BranchDetail(lineNumber: number, blockNumber: number): BranchDetail

Properties

Protected _executionCount

_executionCount: number = -1

Execution Count

The execution count of this Detail

Protected _lineNumber

_lineNumber: number = -1

Line Number

The line number that this Detail is associated with

Accessors

blockNumber

  • get blockNumber(): number

branches

  • get branches(): object

executionCount

  • get executionCount(): number

lineNumber

  • get lineNumber(): number

Methods

addBranchExecutionCount

  • addBranchExecutionCount(branchNumber: number, executionCount: number): void
  • Add Branch Execution Data

    Adds an execution count for a specific branching path. If the branching path already exists, the execution count is appended to the existing value. Otherwise, a new entry is saved with the given execution count.

    The execution count is appended to the total execution count of this BranchDetail as well.

    Parameters

    • branchNumber: number

      A 0-indexed identifier of the branch path

    • executionCount: number

      The execution count to add

    Returns void

clone

combine

getBranchExecutionCount

  • getBranchExecutionCount(branchNumber: number): number
  • Get the execution count of a specific branch path

    If the given branch number was not previously tracked, 0 will be returned.

    Parameters

    • branchNumber: number

      A 0-indexed identifier of the branch path

    Returns number

Generated using TypeDoc