PPtr
PPtr is a smuggler operator. It takes the address of the address of data and compares it to val.
val depends on data type. For example, if the compared data is an
**int, one can have:
as well as an other operator:
It is more efficient and shorter to write than:
TypeBehind method returns the reflect.Type of a pointer on a
pointer on val, except if val is a TestDeep operator. In this
case, it delegates TypeBehind() to the operator and returns the
reflect.Type of a pointer on a pointer on the returned value (if
non-nil of course).
See also
Ptr.
See also PPtr godoc.
Example
CmpPPtr shortcut
CmpPPtr is a shortcut for:
See above for details.
Returns true if the test is OK, false if it fails.
If t is a *T then its Config field is inherited.
args… are optional and allow to name the test. This name is
used in case of failure to qualify the test. If len(args) > 1 and
the first item of args is a string and contains a ‘%’ rune then
fmt.Fprintf is used to compose the name, else args are passed to
fmt.Fprint. Do not forget it is the name of the test, not the
reason of a potential failure.
See also CmpPPtr godoc.
Example
T.PPtr shortcut
PPtr is a shortcut for:
See above for details.
Returns true if the test is OK, false if it fails.
args… are optional and allow to name the test. This name is
used in case of failure to qualify the test. If len(args) > 1 and
the first item of args is a string and contains a ‘%’ rune then
fmt.Fprintf is used to compose the name, else args are passed to
fmt.Fprint. Do not forget it is the name of the test, not the
reason of a potential failure.
See also T.PPtr godoc.