Skip to contents

Mapping Tests to Documentation

The primary user-facing functionality provided by the package.

test_trace_df()
Build a traceability matrix that links documented behaviors to unit tests

Working with srcrefs

Want to dig deeper? This functions will help you tease apart the internals of package objects, documentation and tests.

pkg_srcrefs()
Extract all the srcref objects of objects within a package namespace
test_srcrefs()
Extract test srcref objects
trace_srcrefs()
Extract srcref objects from coverage object traces
as.data.frame(<list_of_srcref>)
Coerce a list_of_srcref object to a data.frame
match_containing_srcrefs()
Match srcrefs against srcrefs that contain them
join_on_containing_srcrefs()
Join srcref data.frames by intersection of srcref spans
Rd_df()
Create a tabular representation of man file information

Extracting Unit Test Descriptions

An extensible interface for extracting test information from test calls.

test_description()
Parse a test description from the calling expression

Miscellaneous Internals

Everthing that happens behind-the-scenes.

Rd_df()
Create a tabular representation of man file information
as.data.frame(<list_of_srcref>)
Coerce a list_of_srcref object to a data.frame
as.package()
A simple alternative to devtools::as.package
as_list_of_srcref()
Create an S3 list of srcref objects
as_test_desc() as_testthat_desc()
Wrap object in test description derivation data
coverage_check_has_recorded_tests()
Check that the coverage object retains testing information
coverage_get_tests()
Retrieve test traces from a coverage object
coverage_has_recorded_tests()
Test that the coverage object retains testing information
.tools
Loading unexported helpers from tools
expr_str()
Convert an expression, call or symbol to a single-line string
flat_map_srcrefs()
Map srcrefs over an iterable object, Filtering non-srcref results
format(<list_of_srcref>)
Format a list_of_srcref object
getSrcFilepath()
Get the full path to the srcref file
get_namespace_object_names()
Get namespace exports, filtering methods tables and definitions
is_srcref()
Test whether an object is a srcref object
join_on_containing_srcrefs()
Join srcref data.frames by intersection of srcref spans
match_containing_srcrefs()
Match srcrefs against srcrefs that contain them
new_empty_test_trace_tally()
Build an empty covr-style test trace mapping
obj_namespace_name()
Get namespace export namespace name
package_check_has_keep_source()
Verify that the package collection contains srcref information
pkg_srcrefs()
Extract all the srcref objects of objects within a package namespace
pkg_srcrefs_df()
Create a data.frame of package srcref objects
srcref_expr()
Parse the expression associated with a srcref
srcref_str()
Parse the expression associated with a srcref
srcrefs()
Retrieve srcrefs
test_description()
Parse a test description from the calling expression
test_description_test_that()
Parse the test description from a test_that call
test_description_test_that_describe()
Parse the test description from a describe call
test_description_test_that_describe_it()
Parse the test description from a it call
test_srcrefs()
Extract test srcref objects
test_srcrefs_df()
Create a data.frame of coverage test srcref objects
test_trace_df()
Build a traceability matrix that links documented behaviors to unit tests
test_trace_mapping()
Create a data.frame mapping tests to coverage traces
trace_srcrefs()
Extract srcref objects from coverage object traces
trace_srcrefs_df()
Create a data.frame of coverage trace srcref objects
with_pseudo_srcref()
For consistency, stub calls with srcref-like attributes