Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for 50000 (0.2 sec)

  1. src/bytes/buffer_test.go

    			b.Fatal(err)
    		}
    	}
    }
    
    func TestGrow(t *testing.T) {
    	x := []byte{'x'}
    	y := []byte{'y'}
    	tmp := make([]byte, 72)
    	for _, growLen := range []int{0, 100, 1000, 10000, 100000} {
    		for _, startLen := range []int{0, 100, 1000, 10000, 100000} {
    			xBytes := Repeat(x, startLen)
    
    			buf := NewBuffer(xBytes)
    			// If we read, this affects buf.off, which is good to test.
    			readBytes, _ := buf.Read(tmp)
    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)
  2. src/archive/zip/reader_test.go

    		}
    		r.Close()
    	}
    }
    
    // Verify that this particular malformed zip file is rejected.
    func TestIssue10956(t *testing.T) {
    	data := []byte("PK\x06\x06PK\x06\a0000\x00\x00\x00\x00\x00\x00\x00\x00" +
    		"0000PK\x05\x06000000000000" +
    		"0000\v\x00000\x00\x00\x00\x00\x00\x00\x000")
    	r, err := NewReader(bytes.NewReader(data), int64(len(data)))
    	if err == nil {
    		t.Errorf("got nil error, want ErrFormat")
    	}
    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)
  3. src/cmd/cgo/internal/test/callback.go

    	defer func() {
    		s := recover()
    		if s != nil {
    			t.Fatal("panic during callback:", s)
    		}
    	}()
    	C.callGoFoo()
    }
    
    //export goFoo
    func goFoo() {
    	x := 1
    	for i := 0; i < 10000; i++ {
    		// variadic call mallocs + writes to
    		variadic(x, x, x)
    		if x != 1 {
    			panic("bad x")
    		}
    	}
    }
    
    func variadic(x ...interface{}) {}
    
    func testBlocking(t *testing.T) {
    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)
  4. src/cmd/cgo/gcc.go

    			//
    			//     myfunction(42, "foo")
    			//
    			// If a var has no name we won't see attempts to
    			// refer to it via "C.<name>", so skip these vars
    			//
    			// See issue 53000 for more context.
    			if name == "" {
    				break
    			}
    			typOff, _ := e.Val(dwarf.AttrType).(dwarf.Offset)
    			if typOff == 0 {
    				if e.Val(dwarf.AttrSpecification) != nil {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Nov 02 16:43:23 GMT 2023
    - 97K bytes
    - Viewed (0)
  5. misc/chrome/gophertool/gopher.js

    var pkgRE = /^[a-z0-9_\/]+$/;
    
    function urlForInput(t) {
        if (!t) {
            return null;
        }
    
        if (numericRE.test(t)) {
            if (t < 150000) {
                // We could use the golang.org/cl/ handler here, but
                // avoid some redirect latency and go right there, since
                // one is easy. (no server-side mapping)
    JavaScript
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Sat Jul 11 14:36:33 GMT 2015
    - 1.2K bytes
    - Viewed (0)
  6. doc/asm.html

    package main
    
    func main() {
    	println(3)
    }
    $ GOOS=linux GOARCH=amd64 go tool compile -S x.go        # or: go build -gcflags -S x.go
    "".main STEXT size=74 args=0x0 locals=0x10
    	0x0000 00000 (x.go:3)	TEXT	"".main(SB), $16-0
    	0x0000 00000 (x.go:3)	MOVQ	(TLS), CX
    	0x0009 00009 (x.go:3)	CMPQ	SP, 16(CX)
    	0x000d 00013 (x.go:3)	JLS	67
    	0x000f 00015 (x.go:3)	SUBQ	$16, SP
    	0x0013 00019 (x.go:3)	MOVQ	BP, 8(SP)
    HTML
    - Registered: Tue May 07 11:14:38 GMT 2024
    - Last Modified: Tue Nov 28 19:15:27 GMT 2023
    - 36.3K bytes
    - Viewed (0)
  7. src/archive/tar/tar_test.go

    		wantInverted: []sparseEntry{{0, 0}},
    	}, {
    		in: []sparseEntry{}, size: 5000,
    		wantValid:    true,
    		wantInverted: []sparseEntry{{0, 5000}},
    	}, {
    		in: []sparseEntry{{0, 5000}}, size: 5000,
    		wantValid:    true,
    		wantAligned:  []sparseEntry{{0, 5000}},
    		wantInverted: []sparseEntry{{5000, 0}},
    	}, {
    		in: []sparseEntry{{1000, 4000}}, size: 5000,
    		wantValid:    true,
    		wantAligned:  []sparseEntry{{1024, 3976}},
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Mar 15 16:01:50 GMT 2024
    - 24K bytes
    - Viewed (0)
  8. src/bufio/scan_test.go

    	}
    	return 0, nil, nil
    }
    
    // Check that the looping-at-EOF check doesn't trigger for merely empty tokens.
    func TestEmptyLinesOK(t *testing.T) {
    	c := countdown(10000)
    	s := NewScanner(strings.NewReader(strings.Repeat("\n", 10000)))
    	s.Split(c.split)
    	for s.Scan() {
    	}
    	if s.Err() != nil {
    		t.Fatal("after scan:", s.Err())
    	}
    	if c != 0 {
    		t.Fatalf("stopped with %d left to process", c)
    	}
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Sep 22 16:22:42 GMT 2023
    - 14.3K bytes
    - Viewed (0)
  9. src/archive/tar/writer_test.go

    	// that fails and replaced ever char through numbers to anonymize the sample.
    	longName := "/0000_0000000/00000-000000000/0000_0000000/00000-0000000000000/0000_0000000/00000-0000000-00000000/0000_0000000/00000000/0000_0000000/000/0000_0000000/00000000v00/0000_0000000/000000/0000_0000000/0000000/0000_0000000/00000y-00/0000/0000/00000000/0x000000/"
    	hdr.Name = longName
    
    	hdr.Size = 0
    	var buf bytes.Buffer
    	writer := NewWriter(&buf)
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Tue Feb 27 16:39:23 GMT 2024
    - 38.7K bytes
    - Viewed (0)
  10. src/cmd/cgo/internal/test/issue21897.go

    import "C"
    import (
    	"runtime/debug"
    	"testing"
    	"unsafe"
    )
    
    func test21897(t *testing.T) {
    	// Please write barrier, kick in soon.
    	defer debug.SetGCPercent(debug.SetGCPercent(1))
    
    	for i := 0; i < 10000; i++ {
    		testCFNumberRef()
    		testCFDateRef()
    		testCFBooleanRef()
    		// Allocate some memory, so eventually the write barrier is enabled
    		// and it will see writes of bad pointers in the test* functions below.
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri May 12 12:00:02 GMT 2023
    - 1.4K bytes
    - Viewed (0)
Back to top