func TestZeroWithPrivateField(t *testing.T) {
	type PrivateFieldStruct struct {
		privField   *int
		PublicField *int
	}
	pfstruct := new(PrivateFieldStruct)

	err := Zero(pfstruct)

	if err != nil {
		t.Errorf("Private field struct produced error: %v", err)
	}

	if pfstruct.privField != nil {
		t.Errorf("Private field is not nil: %v", pfstruct.privField)
	}

	if pfstruct.PublicField == nil || *pfstruct.PublicField != 0 {
		t.Errorf("Public field was not allocated correctly: %v", pfstruct.PublicField)
	}
}
// TestZeroWithPrivateField tests that a private field is not allocated
// using `Zero` but a public field is allocated.
TestZeroWithPrivateField tests that a private field is not allocated
using `Zero` but a public field is allocated.
// TestZeroWithPrivateField tests that a private field is not allocated // using ` Zero ` but a public field is allocated .
func TestZeroWithPrivateField(t *testing.T) {
	type PrivateFieldStruct struct {
		privField   *int
		PublicField *int
	}
	pfstruct := new(PrivateFieldStruct)
	err := Zero(pfstruct)
	if err != nil {
		t.Errorf("Private field struct produced error: %v", err)
	}
	if pfstruct.privField != nil {
		t.Errorf("Private field is not nil: %v", pfstruct.privField)
	}
	if pfstruct.PublicField == nil || *pfstruct.PublicField != 0 {
		t.Errorf("Public field was not allocated correctly: %v", pfstruct.PublicField)
	}
}
func TestZeroWithPrivateField ( t * testing . T ) { type PrivateFieldStruct struct { privField * int PublicField * int } pfstruct := new ( PrivateFieldStruct ) err := Zero ( pfstruct ) if err != nil { t . Errorf ( " " , err ) } if pfstruct . privField != nil { t . Errorf ( " " , pfstruct . privField ) } if pfstruct . PublicField == nil || * pfstruct . PublicField != 0 { t . Errorf ( " " , pfstruct . PublicField ) } }
TestZeroWithPrivateField tests that a private field is not allocated
using `Zero` but a public field is allocated.
TestZeroWithPrivateField tests that a private field is not allocated using ` Zero ` but a public field is allocated .