func Shallow(expectedPtr interface{}) TestDeep {
	vptr := reflect.ValueOf(expectedPtr)
	shallow := tdShallow{
		base:         newBase(3),
		expectedKind: vptr.Kind(),
	}
	switch shallow.expectedKind {
	case reflect.Chan,
		reflect.Func,
		reflect.Map,
		reflect.Ptr,
		reflect.Slice,
		reflect.UnsafePointer:
		shallow.expectedPointer = vptr.Pointer()
	case reflect.String:
		shallow.expectedStr = vptr.String()
		shallow.expectedPointer = stringPointer(shallow.expectedStr)
	default:
		shallow.err = ctxerr.OpBadUsage(
			"Shallow", "(CHANNEL|FUNC|MAP|PTR|SLICE|UNSAFE_PTR|STRING)",
			expectedPtr, 1, true)
	}
	return &shallow
}
summary(Shallow): compares pointers only, not their contents
input(Shallow): nil,str,slice,map,ptr,chan,func
Shallow operator compares pointers only, not their contents. It
applies on channels, functions (with some restrictions), maps,
pointers, slices and strings.

During a match, the compared data must be the same as "expectedPtr"
to succeed.

a, b := 123, 123
td.Cmp(t, &a, td.Shallow(&a)) // succeeds
td.Cmp(t, &a, td.Shallow(&b)) // fails even if a == b as &a != &b

back := "foobarfoobar"
a, b := back[:6], back[6:]
// a == b but...
td.Cmp(t, &a, td.Shallow(&b)) // fails

Be careful for slices and strings! Shallow can succeed but the
slices/strings not be identical because of their different
lengths. For example:

a := "foobar yes!"
b := a[:1]                    // aka "f"
td.Cmp(t, &a, td.Shallow(&b)) // succeeds as both strings point to the same area, even if len() differ

The same behavior occurs for slices:

a := []int{1, 2, 3, 4, 5, 6}
b := a[:2]                    // aka []int{1, 2}
td.Cmp(t, &a, td.Shallow(&b)) // succeeds as both slices point to the same area, even if len() differ
package td
import (
	"fmt"
	"reflect"
	"unsafe"
	"github.com/maxatome/go-testdeep/internal/ctxerr"
	"github.com/maxatome/go-testdeep/internal/types"
)
type tdShallow struct {
	base
	expectedKind    reflect.Kind
	expectedPointer uintptr
	expectedStr     string  
}
var _ TestDeep = &tdShallow{}
func stringPointer(s string) uintptr {
	return (*reflect.StringHeader)(unsafe.Pointer(&s)).Data
}