Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for 0xdead (0.27 sec)

  1. src/encoding/json/decode_test.go

    			}
    		})
    	}
    }
    
    type unmarshalPanic struct{}
    
    func (unmarshalPanic) UnmarshalJSON([]byte) error { panic(0xdead) }
    
    func TestUnmarshalPanic(t *testing.T) {
    	defer func() {
    		if got := recover(); !reflect.DeepEqual(got, 0xdead) {
    			t.Errorf("panic() = (%T)(%v), want 0xdead", got, got)
    		}
    	}()
    	Unmarshal([]byte("{}"), &unmarshalPanic{})
    	t.Fatalf("Unmarshal should have panicked")
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 11 16:40:14 UTC 2024
    - 67.6K bytes
    - Viewed (0)
Back to top