Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TestEncodeDecodemetacache (0.46 sec)

  1. cmd/metacache_gen_test.go

    	for i := 0; i < b.N; i++ {
    		_, err := v.UnmarshalMsg(bts)
    		if err != nil {
    			b.Fatal(err)
    		}
    	}
    }
    
    func TestEncodeDecodemetacache(t *testing.T) {
    	v := metacache{}
    	var buf bytes.Buffer
    	msgp.Encode(&buf, &v)
    
    	m := v.Msgsize()
    	if buf.Len() > m {
    		t.Log("WARNING: TestEncodeDecodemetacache Msgsize() is inaccurate")
    	}
    
    	vn := metacache{}
    	err := msgp.Decode(&buf, &vn)
    	if err != nil {
    		t.Error(err)
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Apr 23 18:58:53 UTC 2021
    - 2.3K bytes
    - Viewed (0)
Back to top