Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TestGobEncoderIndirectField (0.14 sec)

  1. src/encoding/gob/gobencdec_test.go

    	}
    	if x.G.s != "HIJKL" {
    		t.Errorf("expected `HIJKL` got %s", x.G.s)
    	}
    }
    
    // GobEncode/Decode should work even if the value is
    // more indirect than the receiver.
    func TestGobEncoderIndirectField(t *testing.T) {
    	b := new(bytes.Buffer)
    	// First a field that's a structure.
    	enc := NewEncoder(b)
    	s := &StringStruct{"HIJKL"}
    	sp := &s
    	err := enc.Encode(GobTestIndirectEncDec{17, &sp})
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Aug 01 14:26:13 UTC 2023
    - 19.2K bytes
    - Viewed (0)
Back to top