// NewContainer generates test data.
NewContainer generates test data.
// NewContainer generates test data .
func NewContainer(useValuePtrs bool) (*ContainerType, int) {
	count := 0
	olleh := func() string {
		count++
		return "olleH"
	}
	embedsTarget := func() EmbedsTarget {
		if useValuePtrs {
			return &ByValType{olleh()}
		}
		return ByValType{olleh()}
	}
	target := func() Target {
		if useValuePtrs {
			return &ByValType{olleh()}
		}
		return ByValType{olleh()}
	}
	p1 := target()
	p2 := target()
	p3 := target()
	p4 := embedsTarget()
	p5 := target()
	var nilTarget Target
	typedNil := Target(nil)
	x := &ContainerType{
		ByRef:         ByRefType{olleh()},
		ByRefPtr:      &ByRefType{olleh()},
		ByRefSlice:    []ByRefType{{olleh()}, {olleh()}},
		ByRefPtrSlice: []*ByRefType{{olleh()}, nil, {olleh()}},
		ByVal:         ByValType{olleh()},
		ByValPtr:      &ByValType{olleh()},
		ByValSlice:    []ByValType{{olleh()}, {olleh()}},
		ByValPtrSlice: []*ByValType{{olleh()}, nil, {olleh()}},
		AnotherTarget:    target(),
		AnotherTargetPtr: &p5,
		EmbedsTarget:    &ByValType{olleh()},
		EmbedsTargetPtr: &p4,
		TargetSlice:  []Target{target(), target()},
		NamedTargets: []Target{target(), target()},
		InterfacePtrSlice: []*Target{&p1, nil, &nilTarget, &typedNil, &p2, &p3},
	}
	return x, count
}
func NewContainer ( useValuePtrs bool ) ( * ContainerType , int ) { count := 0 olleh := func ( ) string { count ++ return " " } embedsTarget := func ( ) EmbedsTarget { if useValuePtrs { return & ByValType { olleh ( ) } } return ByValType { olleh ( ) } } target := func ( ) Target { if useValuePtrs { return & ByValType { olleh ( ) } } return ByValType { olleh ( ) } } p1 := target ( ) p2 := target ( ) p3 := target ( ) p4 := embedsTarget ( ) p5 := target ( ) var nilTarget Target typedNil := Target ( nil ) x := & ContainerType { ByRef : ByRefType { olleh ( ) } , ByRefPtr : & ByRefType { olleh ( ) } , ByRefSlice : [ ] ByRefType { { olleh ( ) } , { olleh ( ) } } , ByRefPtrSlice : [ ] * ByRefType { { olleh ( ) } , nil , { olleh ( ) } } , ByVal : ByValType { olleh ( ) } , ByValPtr : & ByValType { olleh ( ) } , ByValSlice : [ ] ByValType { { olleh ( ) } , { olleh ( ) } } , ByValPtrSlice : [ ] * ByValType { { olleh ( ) } , nil , { olleh ( ) } } , AnotherTarget : target ( ) , AnotherTargetPtr : & p5 , EmbedsTarget : & ByValType { olleh ( ) } , EmbedsTargetPtr : & p4 , TargetSlice : [ ] Target { target ( ) , target ( ) } , NamedTargets : [ ] Target { target ( ) , target ( ) } , InterfacePtrSlice : [ ] * Target { & p1 , nil , & nilTarget , & typedNil , & p2 , & p3 } , } return x , count }
NewContainer generates test data.
NewContainer generates test data .