- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 33 for Hancic (0.18 sec)
-
src/cmd/cgo/internal/test/callback_c_gc.c
#include <stdint.h> #include <stdio.h> #include <stdlib.h> /* Test calling panic from C. This is what SWIG does. */ extern void crosscall2(void (*fn)(void *, int), void *, int); extern void _cgo_panic(void *, int); extern void _cgo_allocate(void *, int); void callPanic(void) { struct { const char *p; } a; a.p = "panic from C"; crosscall2(_cgo_panic, &a, sizeof a); *(int*)1 = 1;
C - Registered: Tue Apr 23 11:13:09 GMT 2024 - Last Modified: Fri May 12 12:00:02 GMT 2023 - 592 bytes - Viewed (0) -
src/bytes/buffer_test.go
} } type panicReader struct{ panic bool } func (r panicReader) Read(p []byte) (int, error) { if r.panic { panic("oops") } return 0, io.EOF } // Make sure that an empty Buffer remains empty when // it is "grown" before a Read that panics func TestReadFromPanicReader(t *testing.T) { // First verify non-panic behaviour var buf Buffer
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Fri Apr 26 13:31:36 GMT 2024 - 18.6K bytes - Viewed (0) -
src/cmd/cgo/ast_go118.go
"go/token" ) func (f *File) walkUnexpected(x interface{}, context astContext, visit func(*File, interface{}, astContext)) { switch n := x.(type) { default: error_(token.NoPos, "unexpected type %T in walk", x) panic("unexpected type") case *ast.IndexListExpr: f.walk(&n.X, ctxExpr, visit) f.walk(n.Indices, ctxExpr, visit) } } func funcTypeTypeParams(n *ast.FuncType) *ast.FieldList { return n.TypeParams }
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Wed Nov 30 21:45:10 GMT 2022 - 730 bytes - Viewed (0) -
src/bufio/bufio_test.go
func TestNegativeRead(t *testing.T) { // should panic with a description pointing at the reader, not at itself. // (should NOT panic with slice index error, for example.) b := NewReader(new(negativeReader)) defer func() { switch err := recover().(type) { case nil: t.Fatal("read did not panic") case error:
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Fri Feb 10 18:56:01 GMT 2023 - 51.5K bytes - Viewed (0) -
src/cmd/cgo/internal/test/callback.go
} defer func() { s := recover() if s == nil { t.Fatal("did not panic") } if s.(string) != "callback panic" { t.Fatal("wrong panic:", s) } if !lockedOSThread() { t.Fatal("lost lock on OS thread after panic") } }() nestedCall(func() { panic("callback panic") }) panic("nestedCall returned") } // Callback with zero arguments used to make the stack misaligned,
Go - Registered: Tue Apr 23 11:13:09 GMT 2024 - Last Modified: Fri May 12 12:00:02 GMT 2023 - 111.5K bytes - Viewed (0) -
doc/go1.17_spec.html
At that point, the program is terminated and the error condition is reported, including the value of the argument to <code>panic</code>. This termination sequence is called <i>panicking</i>. </p> <pre> panic(42) panic("unreachable") panic(Error("cannot parse")) </pre> <p> The <code>recover</code> function allows a program to manage behavior of a panicking goroutine.
HTML - Registered: Tue May 07 11:14:38 GMT 2024 - Last Modified: Thu Apr 11 20:22:45 GMT 2024 - 211.6K bytes - Viewed (0) -
src/archive/zip/reader_test.go
b, err := hex.DecodeString(s) if err != nil { panic(err) } return b } func returnBigZipBytes() (r io.ReaderAt, size int64) { b := biggestZipBytes() for i := 0; i < 2; i++ { r, err := NewReader(bytes.NewReader(b), int64(len(b))) if err != nil { panic(err) } f, err := r.File[0].Open() if err != nil { panic(err) } b, err = io.ReadAll(f)
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Wed Mar 27 18:23:49 GMT 2024 - 55.3K bytes - Viewed (0) -
src/arena/arena.go
// allocated from an arena, it is returned untouched. This function is useful // to more easily let an arena-allocated value out-live its arena. // T must be a pointer, a slice, or a string, otherwise this function will panic. func Clone[T any](s T) T { return runtime_arena_heapify(s).(T) } //go:linkname reflect_arena_New reflect.arena_New func reflect_arena_New(a *Arena, typ any) any { return runtime_arena_arena_New(a.a, typ) }
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Wed Oct 12 20:23:36 GMT 2022 - 4.3K bytes - Viewed (0) -
src/cmd/api/api_test.go
t.Fatalf("stdPackages contains unexpected package %s", pkg) } } } func TestIssue64958(t *testing.T) { defer func() { if x := recover(); x != nil { t.Errorf("expected no panic; recovered %v", x) } }() testenv.MustHaveGoBuild(t) for _, context := range contexts { w := NewWalker(context, "testdata/src/issue64958") pkg, err := w.importFrom("p", "", 0)
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Thu Jan 04 17:31:12 GMT 2024 - 7.1K bytes - Viewed (0) -
src/cmd/asm/internal/asm/operand_test.go
func setArch(goarch string) (*arch.Arch, *obj.Link) { buildcfg.GOOS = "linux" // obj can handle this OS for all architectures. buildcfg.GOARCH = goarch architecture := arch.Set(goarch, false) if architecture == nil { panic("asm: unrecognized architecture " + goarch) } ctxt := obj.Linknew(architecture.LinkArch) ctxt.Pkgpath = "pkg" return architecture, ctxt } func newParser(goarch string) *Parser {
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Tue Aug 29 18:31:05 GMT 2023 - 23.9K bytes - Viewed (0)