Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for wantSum (0.13 sec)

  1. src/net/url/url_test.go

    	}
    }
    
    func TestInvalidUserPassword(t *testing.T) {
    	_, err := Parse("http://user^:passwo^******@****.***/")
    	if got, wantsub := fmt.Sprint(err), "net/url: invalid userinfo"; !strings.Contains(got, wantsub) {
    		t.Errorf("error = %q; want substring %q", got, wantsub)
    	}
    }
    
    func TestRejectControlCharacters(t *testing.T) {
    	tests := []string{
    		"http://foo.com/?foo\nbar",
    		"http\r://foo.com/",
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 22:52:38 UTC 2024
    - 52.1K bytes
    - Viewed (0)
  2. src/os/os_test.go

    	io.WriteString(f, data)
    
    	f.Seek(0, 0)
    	b := make([]byte, 5)
    
    	n, err := f.ReadAt(b, -10)
    
    	const wantsub = "negative offset"
    	if !strings.Contains(fmt.Sprint(err), wantsub) || n != 0 {
    		t.Errorf("ReadAt(-10) = %v, %v; want 0, ...%q...", n, err, wantsub)
    	}
    }
    
    func TestWriteAt(t *testing.T) {
    	t.Parallel()
    
    	f := newFile("TestWriteAt", t)
    	defer Remove(f.Name())
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 83.1K bytes
    - Viewed (0)
  3. src/go/types/api_test.go

    		if sel.Indirect() {
    			direct = "->"
    		}
    		got := [2]string{
    			sel.String(),
    			fmt.Sprintf("%s%v", direct, sel.Index()),
    		}
    		want := wantOut[syntax]
    		if want != got {
    			t.Errorf("%s: got %q; want %q", syntax, got, want)
    		}
    		delete(wantOut, syntax)
    
    		// We must explicitly assert properties of the
    		// Signature's receiver since it doesn't participate
    		// in Identical() or String().
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 94.2K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/types2/api_test.go

    		if sel.Indirect() {
    			direct = "->"
    		}
    		got := [2]string{
    			sel.String(),
    			fmt.Sprintf("%s%v", direct, sel.Index()),
    		}
    		want := wantOut[segment]
    		if want != got {
    			t.Errorf("%s: got %q; want %q", segment, got, want)
    		}
    		delete(wantOut, segment)
    
    		// We must explicitly assert properties of the
    		// Signature's receiver since it doesn't participate
    		// in Identical() or String().
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 07 20:08:23 UTC 2024
    - 93.3K bytes
    - Viewed (0)
  5. src/cmd/link/internal/ld/lib.go

    	seen := make(map[loader.Sym]struct{})
    	rval := make([]bool, len(want))
    	wantm := make(map[string]int)
    	for k, w := range want {
    		wantm[w] = k
    	}
    	count := 0
    	for _, s := range undefs {
    		if _, ok := seen[s]; ok {
    			continue
    		}
    		seen[s] = struct{}{}
    		if k, ok := wantm[ctxt.loader.SymName(s)]; ok {
    			rval[k] = true
    			count++
    			if count == len(want) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 21 18:45:27 UTC 2024
    - 88.6K bytes
    - Viewed (0)
Back to top