go/src/internal/unsafeheader/unsafeheader_test.go

// TestTypeMatchesReflectType ensures that the name and layout of the
// unsafeheader types matches the corresponding Header types in the reflect
// package.
func TestTypeMatchesReflectType(t *testing.T) {}

func testHeaderMatchesReflect(t *testing.T, header, reflectHeader any) {}

var unsafePointerType

var uintptrType

func typeCompatible(t, rt reflect.Type) bool {}

// TestWriteThroughHeader ensures that the headers in the unsafeheader package
// can successfully mutate variables of the corresponding built-in types.
//
// This test is expected to fail under -race (which implicitly enables
// -d=checkptr) if the runtime views the header types as incompatible with the
// underlying built-in types.
func TestWriteThroughHeader(t *testing.T) {}