Documentation
¶
Overview ¶
Package bdd defines a BDD-style bifurcated evaluation context, compatible with the build-in testing package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type T ¶
type T struct {
TB
// contains filtered or unexported fields
}
T is a testing context, similar to testing.T, passed to the testing functions in the BDD style bifurcated test evaluation. It forwards most of the testing.T API by encapsulating the current test context as a `TB` interface; only `Parallel()` is dropped as non-relevant.
The `Run()` function has a similar interface as testing.T, but passing a bdd.T object for the nested testing context, and evaluating all branches in a BDD style bifurcated fashion, where each branch is fully and independently re-evaluated for every leaf.
Additional functions `When()` and `Then()` are syntactic sugar on top the `Run()` function. `bdd.Given()` is the root function that initializes the bifurcated evaluation context and runs all the branches.