Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TestCatchInvalidNilValue (0.15 sec)

  1. src/encoding/gob/encoder_test.go

    	}
    	if !reflect.DeepEqual(data, newData) {
    		t.Fatalf("expected %v got %v", data, newData)
    	}
    }
    
    // Test that untyped nils generate an error, not a panic.
    // See Issue 16204.
    func TestCatchInvalidNilValue(t *testing.T) {
    	encodeErr, panicErr := encodeAndRecover(nil)
    	if panicErr != nil {
    		t.Fatalf("panicErr=%v, should not panic encoding untyped nil", panicErr)
    	}
    	if encodeErr == 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