Learn R Programming

covtracer (version 0.0.2)

trace_srcrefs_df: Create a data.frame of coverage trace srcref objects

Description

Extract coverage traces. Traces are the traced lines of code counted when evaluating code coverage, which are used for counting expression evaluation. Each traced is a unique expression within a package's source code.

Usage

trace_srcrefs_df(x)

Value

A data.frame, where each record it a trace srcref with variables:

name

A character identifier. This will use the names of the elements of a coverage object, which are srcref "keys".

srcref

A srcref object of the trace source code location

Arguments

x

A package_coverage coverage object, from which the name of the package used is extracted.

See Also

srcrefs test_trace_mapping

Other srcrefs_df: pkg_srcrefs_df(), test_srcrefs_df()

Examples

Run this code
options(covr.record_tests = TRUE)
pkg_path <- system.file("examplepkg", package = "covtracer")
cov <- covr::package_coverage(pkg_path)
trace_srcrefs_df(cov)

Run the code above in your browser using DataLab