Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for Buf (0.2 sec)

  1. src/bufio/bufio_test.go

    			// and that the data is correct.
    
    			w.Reset()
    			buf := NewWriterSize(w, bs)
    			context := fmt.Sprintf("nwrite=%d bufsize=%d", nwrite, bs)
    			n, e1 := buf.Write(data[0:nwrite])
    			if e1 != nil || n != nwrite {
    				t.Errorf("%s: buf.Write %d = %d, %v", context, nwrite, n, e1)
    				continue
    			}
    			if e := buf.Flush(); e != nil {
    				t.Errorf("%s: buf.Flush = %v", context, e)
    			}
    
    			written := w.Bytes()
    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)
  2. src/archive/zip/reader_test.go

    		"../foo",
    		"/foo",
    		"a/b/../../../c",
    		`a\b`,
    	} {
    		var buf bytes.Buffer
    		zw := NewWriter(&buf)
    		_, err := zw.Create(path)
    		if err != nil {
    			t.Errorf("zw.Create(%q) = %v", path, err)
    			continue
    		}
    		zw.Close()
    
    		zr, err := NewReader(bytes.NewReader(buf.Bytes()), int64(buf.Len()))
    		if err != ErrInsecurePath {
    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/bytes/bytes_test.go

    			if j != n-7 {
    				b.Fatal("bad index", j)
    			}
    		}
    		buf[n-1] = '\x00'
    		buf[n-7] = '\x00'
    	})
    }
    
    func BenchmarkCount(b *testing.B) {
    	benchBytes(b, indexSizes, func(b *testing.B, n int) {
    		buf := bmbuf[0:n]
    		buf[n-1] = 'x'
    		for i := 0; i < b.N; i++ {
    			j := Count(buf, buf[n-7:])
    			if j != 1 {
    				b.Fatal("bad count", j)
    			}
    		}
    		buf[n-1] = '\x00'
    	})
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Wed Jan 24 16:07:25 GMT 2024
    - 56.2K bytes
    - Viewed (0)
  4. src/cmd/cgo/gcc.go

    			ident[name] = name
    		}
    		fld[n] = &ast.Field{Names: []*ast.Ident{c.Ident(ident[name])}, Type: tgo}
    		sizes = sizes[0 : n+1]
    		sizes[n] = size
    		off += size
    		buf.WriteString(t.C.String())
    		buf.WriteString(" ")
    		buf.WriteString(name)
    		buf.WriteString("; ")
    		if talign > align {
    			align = talign
    		}
    	}
    	if off < dt.ByteSize {
    		fld, sizes = c.pad(fld, sizes, dt.ByteSize-off)
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Nov 02 16:43:23 GMT 2023
    - 97K bytes
    - Viewed (0)
Back to top