% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/trace_tests.R
\name{new_test_counter}
\alias{new_test_counter}
\title{Initialize a new test counter for a coverage trace}
\usage{
new_test_counter(key)
}
\arguments{
\item{key}{generated with \code{\link[=key]{key()}}}
}
\description{
Initialize a test counter, a matrix used to tally tests, their stack depth
and the execution order as the trace associated with \code{key} is hit. Each
test trace is an environment, which allows assignment into a pre-allocated
\code{tests} matrix with minimall reallocation.
}
\details{
The \code{tests} matrix has columns \code{tests}, \code{depth} and \code{i},
corresponding to the test index (the index of the associated test in
\code{.counters$tests}), the stack depth when the trace is evaluated and the
number of traces that have been hit so far during test evaluation.
}
