Search Options

Results per page
Sort
Preferred Languages
Advance

Results 221 - 230 of 1,675 for mypanic (0.99 sec)

  1. test/typeparam/orderedmap.go

    	if _, found := m.Find([]byte("a")); found {
    		panic(fmt.Sprintf("unexpectedly found %q in empty map", []byte("a")))
    	}
    	if !m.Insert([]byte("a"), 'a') {
    		panic(fmt.Sprintf("key %q unexpectedly already present", []byte("a")))
    	}
    	if !m.Insert([]byte("c"), 'c') {
    		panic(fmt.Sprintf("key %q unexpectedly already present", []byte("c")))
    	}
    	if !m.Insert([]byte("b"), 'b') {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 01 19:45:34 UTC 2022
    - 7.1K bytes
    - Viewed (0)
  2. test/typeparam/absdiff.go

    	// if got, want := orderedAbsDifference(1.0, -2.0), 3.0; got != want {
    	// 	panic(fmt.Sprintf("got = %v, want = %v", got, want))
    	// }
    	// if got, want := orderedAbsDifference(-1.0, 2.0), 3.0; got != want {
    	// 	panic(fmt.Sprintf("got = %v, want = %v", got, want))
    	// }
    	// if got, want := 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: Tue Mar 01 19:45:34 UTC 2022
    - 2.9K bytes
    - Viewed (0)
  3. test/convert.go

    	want := typeof(g)
    	if t := typeof(f); t != want {
    		println("type of f is", t, "want", want)
    		panic("fail")
    	}
    
    	want = typeof(a)
    	if t := typeof(+a); t != want {
    		println("type of +a is", t, "want", want)
    		panic("fail")
    	}
    	if t := typeof(a + 0); t != want {
    		println("type of a+0 is", t, "want", want)
    		panic("fail")
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun Feb 19 02:19:43 UTC 2012
    - 833 bytes
    - Viewed (0)
  4. test/recover2.go

    func main() {
    	test1()
    	test2()
    	test3()
    	test4()
    	test5()
    	test6()
    	test7()
    }
    
    func mustRecover(s string) {
    	v := recover()
    	if v == nil {
    		panic("expected panic")
    	}
    	if e := v.(error).Error(); strings.Index(e, s) < 0 {
    		panic("want: " + s + "; have: " + e)
    	}
    }
    
    func test1() {
    	defer mustRecover("index")
    	println(x[123])
    }
    
    func test2() {
    	defer mustRecover("slice")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 03 20:41:29 UTC 2019
    - 1.2K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/inline/inlheur/testdata/props/calls.go

    	if x != G {
    		panic("ouch")
    		/* Notes: */
    		/* - we only look for post-dominating panic/exit, so */
    		/*   this site will on fact not have a panicpath flag */
    		/* - vet will complain about this site as unreachable */
    		callee(x)
    	}
    	if x != G {
    		callee(x)
    		if x < 100 {
    			panic("ouch")
    		}
    	}
    	if x+G == 101 {
    		if x < 100 {
    			panic("ouch")
    		}
    		callee(x)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Nov 16 20:15:25 UTC 2023
    - 7.1K bytes
    - Viewed (0)
  6. src/math/big/hilbert_test.go

    	if !(0 <= i && i < a.n && 0 <= j && j < a.m) {
    		panic("index out of range")
    	}
    	return a.a[i*a.m+j]
    }
    
    func (a *matrix) set(i, j int, x *Rat) {
    	if !(0 <= i && i < a.n && 0 <= j && j < a.m) {
    		panic("index out of range")
    	}
    	a.a[i*a.m+j] = x
    }
    
    func newMatrix(n, m int) *matrix {
    	if !(0 <= n && 0 <= m) {
    		panic("illegal matrix")
    	}
    	a := new(matrix)
    	a.n = n
    	a.m = m
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Sep 08 04:08:51 UTC 2014
    - 2.9K bytes
    - Viewed (0)
  7. test/fixedbugs/issue20245.go

    // errorcheck -d=panic
    
    // Copyright 2017 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    // Issue 20245: panic while formatting an error message
    
    package p
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 05 18:46:16 UTC 2021
    - 301 bytes
    - Viewed (0)
  8. src/runtime/cgocallback.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package runtime
    
    // These functions are called from C code via cgo/callbacks.go.
    
    // Panic.
    
    func _cgo_panic_internal(p *byte) {
    	panic(gostringnocopy(p))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 01 23:34:33 UTC 2016
    - 317 bytes
    - Viewed (0)
  9. src/vendor/golang.org/x/crypto/chacha20poly1305/chacha20poly1305.go

    	return Overhead
    }
    
    func (c *chacha20poly1305) Seal(dst, nonce, plaintext, additionalData []byte) []byte {
    	if len(nonce) != NonceSize {
    		panic("chacha20poly1305: bad nonce length passed to Seal")
    	}
    
    	if uint64(len(plaintext)) > (1<<38)-64 {
    		panic("chacha20poly1305: plaintext too large")
    	}
    
    	return c.seal(dst, nonce, plaintext, additionalData)
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 09 20:10:44 UTC 2021
    - 2.8K bytes
    - Viewed (0)
  10. src/vendor/golang.org/x/crypto/chacha20poly1305/xchacha20poly1305.go

    }
    
    func (x *xchacha20poly1305) Open(dst, nonce, ciphertext, additionalData []byte) ([]byte, error) {
    	if len(nonce) != NonceSizeX {
    		panic("chacha20poly1305: bad nonce length passed to Open")
    	}
    	if len(ciphertext) < 16 {
    		return nil, errOpen
    	}
    	if uint64(len(ciphertext)) > (1<<38)-48 {
    		panic("chacha20poly1305: ciphertext too large")
    	}
    
    	c := new(chacha20poly1305)
    	hKey, _ := chacha20.HChaCha20(x.key[:], nonce[0:16])
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 09 20:10:44 UTC 2021
    - 2.5K bytes
    - Viewed (0)
Back to top