Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TestMapBug1 (0.16 sec)

  1. src/encoding/gob/encoder_test.go

    	}
    }
    
    // The bugs keep coming. We forgot to send map subtypes before the map.
    
    type Bug1Elem struct {
    	Name string
    	Id   int
    }
    
    type Bug1StructMap map[string]Bug1Elem
    
    func TestMapBug1(t *testing.T) {
    	in := make(Bug1StructMap)
    	in["val1"] = Bug1Elem{"elem1", 1}
    	in["val2"] = Bug1Elem{"elem2", 2}
    
    	b := new(bytes.Buffer)
    	enc := NewEncoder(b)
    	err := enc.Encode(in)
    	if err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 29.7K bytes
    - Viewed (0)
Back to top