go/src/encoding/gob/encoder_test.go

// Test basic operations in a safe manner.
func TestBasicEncoderDecoder(t *testing.T) {}

func TestEncodeIntSlice(t *testing.T) {}

type ET0

type ET2

type ET1

type ET3

type ET4

func TestEncoderDecoder(t *testing.T) {}

// Run one value through the encoder/decoder, but use the wrong type.
// Input is always an ET1; we compare it to whatever is under 'e'.
func badTypeCheck(e any, shouldFail bool, msg string, t *testing.T) {}

// Test that we recognize a bad type the first time.
func TestWrongTypeDecoder(t *testing.T) {}

var unsupportedValues

func TestUnsupported(t *testing.T) {}

func encAndDec(in, out any) error {}

func TestTypeToPtrType(t *testing.T) {}

func TestPtrTypeToType(t *testing.T) {}

func TestTypeToPtrPtrPtrPtrType(t *testing.T) {}

func TestSlice(t *testing.T) {}

func TestValueError(t *testing.T) {}

func TestArray(t *testing.T) {}

func TestRecursiveMapType(t *testing.T) {}

func TestRecursiveSliceType(t *testing.T) {}

// Regression test for bug: must send zero values inside arrays
func TestDefaultsInArray(t *testing.T) {}

var testInt

var testFloat32

var testString

var testSlice

var testMap

var testArray

type SingleTest

var singleTests

func TestSingletons(t *testing.T) {}

func TestStructNonStruct(t *testing.T) {}

type interfaceIndirectTestI

type interfaceIndirectTestT

func (this *interfaceIndirectTestT) F() bool {}

// A version of a bug reported on golang-nuts. Also tests top-level
// slice of interfaces. The issue was registering *T caused T to be
// stored as the concrete type.
func TestInterfaceIndirect(t *testing.T) {}

type Struct0

type NewType0

type ignoreTest

var ignoreTests

func TestDecodeIntoNothing(t *testing.T) {}

func TestIgnoreRecursiveType(t *testing.T) {}

type Bug0Outer

type Bug0Inner

func TestNestedInterfaces(t *testing.T) {}

type Bug1Elem

type Bug1StructMap

func TestMapBug1(t *testing.T) {}

func TestGobMapInterfaceEncode(t *testing.T) {}

func TestSliceReusesMemory(t *testing.T) {}

// Used to crash: negative count in recvMessage.
func TestBadCount(t *testing.T) {}

// Verify that sequential Decoders built on a single input will
// succeed if the input implements ReadByte and there is no
// type information in the stream.
func TestSequentialDecoder(t *testing.T) {}

type Bug2

func TestChanFuncIgnored(t *testing.T) {}

func TestSliceIncompatibility(t *testing.T) {}

type Bug3

func TestGobPtrSlices(t *testing.T) {}

// getDecEnginePtr cached engine for ut.base instead of ut.user so we passed
// a *map and then tried to reuse its engine to decode the inner map.
func TestPtrToMapOfMap(t *testing.T) {}

// Test that untyped nils generate an error, not a panic.
// See Issue 16204.
func TestCatchInvalidNilValue(t *testing.T) {}

// A top-level nil pointer generates a panic with a helpful string-valued message.
func TestTopLevelNilPointer(t *testing.T) {}

func encodeAndRecover(value any) (encodeErr, panicErr error) {}

func TestNilPointerPanics(t *testing.T) {}

func TestNilPointerInsideInterface(t *testing.T) {}

type Bug4Public

type Bug4Secret

// Test that a failed compilation doesn't leave around an executable encoder.
// Issue 3723.
func TestMultipleEncodingsOfBadType(t *testing.T) {}

type Z

func Test29ElementSlice(t *testing.T) {}

// Don't crash, just give error when allocating a huge slice.
// Issue 8084.
func TestErrorForHugeSlice(t *testing.T) {}

type badDataTest

var badDataTests

// TestBadData tests that various problems caused by malformed input
// are caught as errors and do not cause panics.
func TestBadData(t *testing.T) {}

func TestDecodeErrorMultipleTypes(t *testing.T) {}

// Issue 24075
func TestMarshalFloatMap(t *testing.T) {}

func TestDecodePartial(t *testing.T) {}

func TestDecoderOverflow(t *testing.T) {}