Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TestValuePanic (0.1 sec)

  1. src/sync/atomic/value_test.go

    		t.Fatalf("wrong value: got %+v, want foo", x)
    	}
    	v.Store("barbaz")
    	x = v.Load()
    	if xx, ok := x.(string); !ok || xx != "barbaz" {
    		t.Fatalf("wrong value: got %+v, want barbaz", x)
    	}
    }
    
    func TestValuePanic(t *testing.T) {
    	const nilErr = "sync/atomic: store of nil value into Value"
    	const badErr = "sync/atomic: store of inconsistently typed value into Value"
    	var v Value
    	func() {
    		defer func() {
    			err := recover()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Dec 13 18:45:54 UTC 2021
    - 6.1K bytes
    - Viewed (0)
Back to top