Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TestMarshalPanic (0.17 sec)

  1. src/encoding/json/encode_test.go

    			}
    		})
    	}
    }
    
    type marshalPanic struct{}
    
    func (marshalPanic) MarshalJSON() ([]byte, error) { panic(0xdead) }
    
    func TestMarshalPanic(t *testing.T) {
    	defer func() {
    		if got := recover(); !reflect.DeepEqual(got, 0xdead) {
    			t.Errorf("panic() = (%T)(%v), want 0xdead", got, got)
    		}
    	}()
    	Marshal(&marshalPanic{})
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 18:42:28 UTC 2024
    - 29.4K bytes
    - Viewed (0)
Back to top