Search Options

Results per page
Sort
Preferred Languages
Advance

Results 121 - 130 of 1,675 for mypanic (0.12 sec)

  1. test/typeparam/issue48042.go

    	// Make sure the function conversion is correct
    	if n := *(foo.f1()) ; n != 100{
    		panic(fmt.Sprintf("%v",n))
    	}
    	if n := *(foo.f2()) ; n != 100{
    		panic(fmt.Sprintf("%v",n))
    	}
    	if n := *(foo.f3()) ; n != 100{
    		panic(fmt.Sprintf("%v",n))
    	}
    	if n := *(foo.f4()) ; n != 100{
    		panic(fmt.Sprintf("%v",n))
    	}
    	if n := *(foo.f5()) ; n != 100{
    		panic(fmt.Sprintf("%v",n))
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 01 19:45:34 UTC 2022
    - 1.3K bytes
    - Viewed (0)
  2. src/runtime/traceback.go

    		return false
    	}
    
    	name := sf.name()
    
    	// Special case: always show runtime.gopanic frame
    	// in the middle of a stack trace, so that we can
    	// see the boundary between ordinary code and
    	// panic-induced deferred code.
    	// See golang.org/issue/5832.
    	if name == "runtime.gopanic" && !firstFrame {
    		return true
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 16:25:21 UTC 2024
    - 55.1K bytes
    - Viewed (0)
  3. test/typeparam/absdiffimp.dir/main.go

    	// if got, want := a.OrderedAbsDifference(1.0, -2.0), 3.0; got != want {
    	// 	panic(fmt.Sprintf("got = %v, want = %v", got, want))
    	// }
    	// if got, want := a.OrderedAbsDifference(-1.0, 2.0), 3.0; got != want {
    	// 	panic(fmt.Sprintf("got = %v, want = %v", got, want))
    	// }
    	// if got, want := a.OrderedAbsDifference(-20, 15), 35; got != want {
    	// 	panic(fmt.Sprintf("got = %v, want = %v", got, want))
    	// }
    	//
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 28 00:11:24 UTC 2021
    - 998 bytes
    - Viewed (0)
  4. src/cmd/compile/internal/walk/expr.go

    	case ir.OANDAND, ir.OOROR:
    		n := n.(*ir.LogicalExpr)
    		return walkLogical(n, init)
    
    	case ir.OPRINT, ir.OPRINTLN:
    		return walkPrint(n.(*ir.CallExpr), init)
    
    	case ir.OPANIC:
    		n := n.(*ir.UnaryExpr)
    		return mkcall("gopanic", nil, init, n.X)
    
    	case ir.ORECOVERFP:
    		return walkRecoverFP(n.(*ir.CallExpr), init)
    
    	case ir.OCFUNC:
    		return n
    
    	case ir.OCALLINTER, ir.OCALLFUNC:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 04 17:34:01 UTC 2024
    - 27.6K bytes
    - Viewed (0)
  5. test/fixedbugs/issue60601.go

    	shouldPanic("divide by zero", func() { div[[0]byte]() })
    }
    
    func shouldPanic(str string, f func()) {
    	defer func() {
    		err := recover()
    		if err == nil {
    			panic("did not panic")
    		}
    		s := err.(error).Error()
    		if !strings.Contains(s, str) {
    			panic("got panic " + s + ", want " + str)
    		}
    	}()
    
    	f()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jun 15 18:41:09 UTC 2023
    - 862 bytes
    - Viewed (0)
  6. src/hash/crc32/crc32_otherarch.go

    func archInitIEEE()                              { panic("not available") }
    func archUpdateIEEE(crc uint32, p []byte) uint32 { panic("not available") }
    
    func archAvailableCastagnoli() bool                    { return false }
    func archInitCastagnoli()                              { panic("not available") }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 28 18:17:57 UTC 2021
    - 681 bytes
    - Viewed (0)
  7. test/indirect.go

    			len(m3)
    	if x != 1 {
    		println("wrong maplen")
    		panic("fail")
    	}
    
    	x =
    		len(s0) +
    			len(s3)
    	if x != 1 {
    		println("wrong stringlen")
    		panic("fail")
    	}
    
    	x =
    		len(a0) +
    			len(a2)
    	if x != 20 {
    		println("wrong arraylen")
    		panic("fail")
    	}
    
    	x =
    		len(b0) +
    			len(b3)
    	if x != 3 {
    		println("wrong slicelen")
    		panic("fail")
    	}
    
    	x =
    		cap(b0) +
    			cap(b3)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 23 07:47:26 UTC 2012
    - 1.4K bytes
    - Viewed (0)
  8. src/crypto/subtle/xor_test.go

    	t.Helper()
    	defer func() {
    		switch msg := recover().(type) {
    		case nil:
    			t.Errorf("expected panic(%q), but did not panic", expected)
    		case string:
    			if msg != expected {
    				t.Errorf("expected panic(%q), but got panic(%q)", expected, msg)
    			}
    		default:
    			t.Errorf("expected panic(%q), but got panic(%T%v)", expected, msg, msg)
    		}
    	}()
    	f()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Feb 16 15:51:19 UTC 2024
    - 2.4K bytes
    - Viewed (0)
  9. test/defernil.go

    // Check that deferring a nil function causes a proper
    // panic when the deferred function is invoked (not
    // when the function is deferred).
    // See Issue #8047 and #34926.
    
    package main
    
    var x = 0
    
    func main() {
    	defer func() {
    		err := recover()
    		if err == nil {
    			panic("did not panic")
    		}
    		if x != 1 {
    			panic("FAIL")
    		}
    	}()
    	f()
    }
    
    func f() {
    	var nilf func()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Oct 16 00:05:37 UTC 2019
    - 563 bytes
    - Viewed (0)
  10. test/fixedbugs/issue8606.go

    			defer func() {
    				if recover() != nil {
    					panic(fmt.Sprintf("comparing %#v and %#v panicked", test.a, test.b))
    				}
    			}()
    			if test.a == test.b {
    				panic(fmt.Sprintf("values %#v and %#v should not be equal", test.a, test.b))
    			}
    		}
    		if test.panic {
    			shouldPanic(fmt.Sprintf("comparing %#v and %#v did not panic", test.a, test.b), f)
    		} else {
    			f() // should not panic
    		}
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 24 21:55:14 UTC 2023
    - 2.3K bytes
    - Viewed (0)
Back to top