Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 32 for Equals (0.2 sec)

  1. src/archive/tar/strconv.go

    	}
    
    	// Extract everything between the space and the final newline.
    	rec, nl, rem := rest[:n-1], rest[n-1:n], rest[n:]
    	if nl != "\n" {
    		return "", "", s, ErrHeader
    	}
    
    	// The first equals separates the key from the value.
    	k, v, ok = strings.Cut(rec, "=")
    	if !ok {
    		return "", "", s, ErrHeader
    	}
    
    	if !validPAXRecord(k, v) {
    		return "", "", s, ErrHeader
    	}
    	return k, v, rem, nil
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Tue Aug 01 14:28:42 GMT 2023
    - 9K bytes
    - Viewed (0)
  2. doc/go1.17_spec.html

    	</li>
    
    	<li>
    	Struct values are comparable if all their fields are comparable.
    	Two struct values are equal if their corresponding
    	non-<a href="#Blank_identifier">blank</a> fields are equal.
    	</li>
    
    	<li>
    	Array values are comparable if values of the array element type are comparable.
    	Two array values are equal if their corresponding elements are equal.
    	</li>
    </ul>
    
    <p>
    HTML
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Thu Apr 11 20:22:45 GMT 2024
    - 211.6K bytes
    - Viewed (0)
  3. src/bytes/buffer_test.go

    			if allocs != 0 {
    				t.Errorf("allocation occurred during write")
    			}
    			// Check that buffer has correct data.
    			if !Equal(buf.Bytes()[0:startLen-readBytes], xBytes[readBytes:]) {
    				t.Errorf("bad initial data at %d %d", startLen, growLen)
    			}
    			if !Equal(buf.Bytes()[startLen-readBytes:startLen-readBytes+growLen], yBytes) {
    				t.Errorf("bad written data at %d %d", startLen, growLen)
    			}
    		}
    	}
    }
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Thu Apr 20 01:07:29 GMT 2023
    - 18.1K bytes
    - Viewed (0)
  4. src/bufio/bufio_test.go

    	l := NewReaderSize(buf, minReadBufferSize)
    	line, isPrefix, err := l.ReadLine()
    	if !isPrefix || !bytes.Equal(line, data[:minReadBufferSize]) || err != nil {
    		t.Errorf("bad result for first line: got %q want %q %v", line, data[:minReadBufferSize], err)
    	}
    	data = data[len(line):]
    	line, isPrefix, err = l.ReadLine()
    	if !isPrefix || !bytes.Equal(line, data[:minReadBufferSize]) || err != nil {
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri Feb 10 18:56:01 GMT 2023
    - 51.5K bytes
    - Viewed (0)
  5. src/cmd/api/api_test.go

    		name                          string
    		features, required, exception []string
    		ok                            bool   // want
    		out                           string // want
    	}{
    		{
    			name:     "equal",
    			features: []string{"A", "B", "C"},
    			required: []string{"A", "B", "C"},
    			ok:       true,
    			out:      "",
    		},
    		{
    			name:     "feature added",
    			features: []string{"A", "B", "C", "D", "E", "F"},
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Thu Jan 04 17:31:12 GMT 2024
    - 7.1K bytes
    - Viewed (0)
  6. src/archive/zip/reader_test.go

    			}(j, ft)
    			n++
    		}
    	}
    	for ; n > 0; n-- {
    		<-done
    	}
    }
    
    func equalTimeAndZone(t1, t2 time.Time) bool {
    	name1, offset1 := t1.Zone()
    	name2, offset2 := t2.Zone()
    	return t1.Equal(t2) && name1 == name2 && offset1 == offset2
    }
    
    func readTestFile(t *testing.T, zt ZipTest, ft ZipTestFile, f *File, raw []byte) {
    	if f.Name != ft.Name {
    		t.Errorf("name=%q, want %q", f.Name, ft.Name)
    	}
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Wed Mar 27 18:23:49 GMT 2024
    - 55.3K bytes
    - Viewed (0)
  7. src/archive/tar/strconv_test.go

    			if v.ok {
    				t.Errorf("parsePAXTime(%q): got parsing failure, want success", v.in)
    			} else {
    				t.Errorf("parsePAXTime(%q): got parsing success, want failure", v.in)
    			}
    		}
    		if ok && !ts.Equal(v.want) {
    			t.Errorf("parsePAXTime(%q): got (%ds %dns), want (%ds %dns)",
    				v.in, ts.Unix(), ts.Nanosecond(), v.want.Unix(), v.want.Nanosecond())
    		}
    	}
    }
    
    func TestFormatPAXTime(t *testing.T) {
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Tue Feb 09 05:28:50 GMT 2021
    - 14K bytes
    - Viewed (0)
  8. src/bytes/boundary_test.go

    	return b[pagesize : 2*pagesize]
    }
    
    func TestEqualNearPageBoundary(t *testing.T) {
    	t.Parallel()
    	b := dangerousSlice(t)
    	for i := range b {
    		b[i] = 'A'
    	}
    	for i := 0; i <= len(b); i++ {
    		Equal(b[:i], b[len(b)-i:])
    		Equal(b[len(b)-i:], b[:i])
    	}
    }
    
    func TestIndexByteNearPageBoundary(t *testing.T) {
    	t.Parallel()
    	b := dangerousSlice(t)
    	for i := range b {
    		idx := IndexByte(b[i:], 1)
    		if idx != -1 {
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Thu Nov 30 20:05:58 GMT 2023
    - 2.8K bytes
    - Viewed (0)
  9. 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 23 11:13:09 GMT 2024
    - Last Modified: Fri Sep 15 19:04:06 GMT 2023
    - 14.1K bytes
    - Viewed (0)
  10. src/cmd/cgo/internal/test/buildid_linux.go

    				t.Logf("note section %d too short for header (%d < 12 + align(%d,4) + align(%d,4))", i, len(d), namesz, descsz)
    				continue sections
    			}
    
    			// 3 == NT_GNU_BUILD_ID
    			if typ == 3 && namesz == 4 && bytes.Equal(d[12:16], []byte("GNU\000")) {
    				c++
    			}
    
    			d = d[12+an+ad:]
    		}
    	}
    
    	if c > 1 {
    		t.Errorf("found %d build ID notes", c)
    	}
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri May 12 12:00:02 GMT 2023
    - 1.7K bytes
    - Viewed (0)
Back to top