Package files

Internal call graph ▹

Internal call graph ▾

In the call graph viewer below, each node
is a function belonging to this package
and its children are the functions it
calls—perhaps dynamically.

The root nodes are the entry points of the
package: functions that may be called from
outside the package.
There may be non-exported or anonymous
functions among them if they are called
dynamically from another package.

Click a node to visit that function's source code.
From there you can visit its callers by
clicking its declaring func
token.

Functions may be omitted if they were
determined to be unreachable in the
particular programs or tests that were
analyzed.

Check adds a function to check the result of the case's function
call. It is a low-level function when Want is insufficient.
For instance, it allows checking whether a function panics.
If no checker functions are registered, function panics are considered
a test failure.

Check modifies and returns c.
Callers my use both Want and Check, and may use Check multiple times.

type Func struct {
// Name is the name of the function to use in error messages.// In most cases it is initialized by New, unless the function// being tested is an anonymous function.
Name string
// contains filtered or unexported fields
}

type Result struct {
// Result is the return value(s) of the function.
Result []interface{}
// Panic is the panic value of the function.
Panic interface{}
// Panicked is whether the function paniced.// It can be used to determine whether a function// called panic(nil).
Panicked bool
}