Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 23 for 10 (0.12 sec)

  1. src/bytes/buffer_test.go

    func TestCapWithPreallocatedSlice(t *testing.T) {
    	buf := NewBuffer(make([]byte, 10))
    	n := buf.Cap()
    	if n != 10 {
    		t.Errorf("expected 10, got %d", n)
    	}
    }
    
    func TestCapWithSliceAndWrittenData(t *testing.T) {
    	buf := NewBuffer(make([]byte, 0, 10))
    	buf.Write([]byte("test"))
    	n := buf.Cap()
    	if n != 10 {
    		t.Errorf("expected 10, got %d", n)
    	}
    }
    
    func TestNil(t *testing.T) {
    	var b *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)
  2. src/cmd/asm/internal/asm/testdata/mips64.s

    //	LMOVB addr ',' rreg
    //	{
    //		outcode(int($1), &$2, 0, &$4);
    //	}
    	MOVB	foo<>+3(SB), R2
    	MOVB	(R4), R21	// 80950000
    	MOVB	9(R19), R18	// 82720009
    	MOVB	-10(R19), R18	// 8272fff6
    	MOVBU	(R4), R21	// 90950000
    	MOVBU	9(R19), R18	// 92720009
    	MOVBU	-10(R19), R18	// 9272fff6
    
    //
    // load floats
    //
    //	LFMOV addr ',' freg
    //	{
    //		outcode(int($1), &$2, 0, &$4);
    //	}
    	MOVD	foo<>+3(SB), F2
    Others
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Tue Aug 08 12:17:12 GMT 2023
    - 12.4K bytes
    - Viewed (0)
  3. src/archive/tar/reader_test.go

    		},
    	}, {
    		maker: makeSparse{makeReg{"abcde", 5}, sparseDatas{{0, 2}, {5, 3}}, 10},
    		tests: []testFnc{
    			testRemaining{10, 5},
    			testRead{100, "ab\x00\x00\x00cde\x00\x00", io.EOF},
    			testRemaining{0, 0},
    		},
    	}, {
    		maker: makeSparse{makeReg{"abc", 5}, sparseDatas{{0, 2}, {5, 3}}, 10},
    		tests: []testFnc{
    			testRemaining{10, 5},
    			testRead{100, "ab\x00\x00\x00c", io.ErrUnexpectedEOF},
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Nov 21 21:14:38 GMT 2022
    - 47.1K bytes
    - Viewed (0)
  4. src/cmd/cgo/doc.go

    		f7,
    		f8,
    		0, // s9
    		0, // s10
    		1
    	};
    
    	const char __cgodebug_str__9[] = s9;
    	const unsigned long long __cgodebug_strlen__9 = sizeof(s9)-1;
    	const char __cgodebug_str__10[] = s10;
    	const unsigned long long __cgodebug_strlen__10 = sizeof(s10)-1;
    
    and again invokes the system C compiler, to produce an object file
    containing debug information. Cgo parses the DWARF debug information
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Sun Mar 31 09:02:45 GMT 2024
    - 42.1K bytes
    - Viewed (0)
  5. src/cmd/asm/internal/asm/operand_test.go

    	{"$0x01", "$1"},
    	{"$0x02", "$2"},
    	{"$0x04", "$4"},
    	{"$0x3FE", "$1022"},
    	{"$0x7fffffe00000", "$140737486258176"},
    	{"$0xfffffffffffff001", "$-4095"},
    	{"$1", "$1"},
    	{"$1.0", "$(1.0)"},
    	{"$10", "$10"},
    	{"$1000", "$1000"},
    	{"$1000000", "$1000000"},
    	{"$1000000000", "$1000000000"},
    	{"$__tsan_func_enter(SB)", "$__tsan_func_enter(SB)"},
    	{"$main(SB)", "$main(SB)"},
    	{"$masks<>(SB)", "$masks<>(SB)"},
    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)
  6. src/bytes/example_test.go

    		b := buf.AvailableBuffer()
    		b = strconv.AppendInt(b, int64(i), 10)
    		b = append(b, ' ')
    		buf.Write(b)
    	}
    	os.Stdout.Write(buf.Bytes())
    	// Output: 0 1 2 3
    }
    
    func ExampleBuffer_Cap() {
    	buf1 := bytes.NewBuffer(make([]byte, 10))
    	buf2 := bytes.NewBuffer(make([]byte, 0, 10))
    	fmt.Println(buf1.Cap())
    	fmt.Println(buf2.Cap())
    	// Output:
    	// 10
    	// 10
    }
    
    func ExampleBuffer_Grow() {
    	var b bytes.Buffer
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Mar 04 15:54:40 GMT 2024
    - 15K bytes
    - Viewed (1)
  7. src/archive/zip/writer_test.go

    	idx := bytes.Index(b, sig[:])
    	if idx == -1 {
    		t.Fatal("file header not found")
    	}
    	b = b[idx:]
    
    	if !bytes.Equal(b[6:10], []byte{0, 0, 0, 0}) { // FileHeader.Flags: 0, FileHeader.Method: 0
    		t.Errorf("unexpected method and flags: %v", b[6:10])
    	}
    
    	if !bytes.Equal(b[14:26], make([]byte, 12)) { // FileHeader.{CRC32,CompressSize,UncompressedSize} all zero.
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Sep 15 19:04:06 GMT 2023
    - 14.1K bytes
    - Viewed (0)
  8. src/archive/tar/writer.go

    			// Format the sparse map.
    			hdr.Size = 0 // Replace with encoded size
    			spb = append(strconv.AppendInt(spb, int64(len(spd)), 10), '\n')
    			for _, s := range spd {
    				hdr.Size += s.Length
    				spb = append(strconv.AppendInt(spb, s.Offset, 10), '\n')
    				spb = append(strconv.AppendInt(spb, s.Length, 10), '\n')
    			}
    			pad := blockPadding(int64(len(spb)))
    			spb = append(spb, zeroBlock[:pad]...)
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Oct 13 18:36:46 GMT 2023
    - 19.6K bytes
    - Viewed (0)
  9. src/archive/zip/zip_test.go

    	b := new(rleBuffer)
    	var all []byte
    	writes := []string{"abcdeee", "eeeeeee", "eeeefghaaiii"}
    	for _, w := range writes {
    		b.Write([]byte(w))
    		all = append(all, w...)
    	}
    	if len(b.buf) != 10 {
    		t.Fatalf("len(b.buf) = %d; want 10", len(b.buf))
    	}
    
    	for i := 0; i < len(all); i++ {
    		for j := 0; j < len(all)-i; j++ {
    			buf := make([]byte, j)
    			n, err := b.ReadAt(buf, int64(i))
    			if err != nil || n != len(buf) {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Wed Mar 27 18:23:49 GMT 2024
    - 19.5K bytes
    - Viewed (0)
  10. src/cmd/asm/internal/asm/parse.go

    func (p *Parser) registerReference(name string) (int16, bool) {
    	r, present := p.arch.Register[name]
    	if present {
    		return r, true
    	}
    	if !p.arch.RegisterPrefix[name] {
    		p.errorf("expected register; found %s", name)
    		return 0, false
    	}
    	p.get('(')
    	tok := p.get(scanner.Int)
    	num, err := strconv.ParseInt(tok.String(), 10, 16)
    	p.get(')')
    	if err != nil {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Wed Feb 21 14:34:57 GMT 2024
    - 36.9K bytes
    - Viewed (0)
Back to top