Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 15 for wantSum (0.26 sec)

  1. src/net/writev_test.go

    		case "windows":
    			var wantCalls int
    			wantSum = want.Len()
    			if wantSum > 0 {
    				wantCalls = 1 // windows will always do 1 syscall, unless sending empty buffer
    			}
    			if len(writeLog.log) != wantCalls {
    				t.Errorf("write calls = %v; want %v", len(writeLog.log), wantCalls)
    			}
    		}
    		if gotSum != wantSum {
    			t.Errorf("writev call sum  = %v; want %v", gotSum, wantSum)
    		}
    		return nil
    	})
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Sep 18 17:20:52 UTC 2023
    - 5K bytes
    - Viewed (0)
  2. pkg/util/hash/hash_test.go

    // limitations under the License.
    
    package hash
    
    import (
    	"testing"
    )
    
    func TestFactory(t *testing.T) {
    	testCases := []struct {
    		name                   string
    		str                    string
    		wantSum                []byte
    		wantStr                string
    		wantUint64             uint64
    		wantLittleEndianUint64 uint64
    	}{
    		{
    			name: "foo",
    			str:  "foo",
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Dec 21 20:24:14 UTC 2023
    - 2.2K bytes
    - Viewed (0)
  3. cmd/kubeadm/app/phases/addons/proxy/proxy_test.go

    		name          string
    		printManifest bool
    		wantOut       string
    		wantErr       bool
    	}{
    		{
    			name:          "do not print manifest",
    			printManifest: false,
    			wantOut:       "[addons] Applied essential addon: kube-proxy\n",
    			wantErr:       false,
    		},
    		{
    			name:          "print manifest",
    			printManifest: true,
    			wantOut: dedent.Dedent(`---
    apiVersion: v1
    kind: ServiceAccount
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sun Feb 18 11:14:32 UTC 2024
    - 8.7K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/test/mergelocals_test.go

    		vname := fields[1]
    		frameoff := fields[3]
    		varsAtFrameOffset[frameoff] = varsAtFrameOffset[frameoff] + 1
    		vars[vname] = frameoff
    	}
    	wantvnum := 8
    	gotvnum := len(vars)
    	if wantvnum != gotvnum {
    		t.Logf(string(out))
    		t.Fatalf("expected trace output on %d vars got %d\n", wantvnum, gotvnum)
    	}
    
    	// Expect at least one clump of at least 3.
    	n3 := 0
    	got := []int{}
    	for _, v := range varsAtFrameOffset {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 18 15:43:53 UTC 2024
    - 4.7K bytes
    - Viewed (0)
  5. src/net/http/http_test.go

    	t.Parallel()
    	goBin := testenv.GoToolPath(t)
    	out, err := testenv.Command(t, goBin, "tool", "nm", goBin).CombinedOutput()
    	if err != nil {
    		t.Fatalf("go tool nm: %v: %s", err, out)
    	}
    	wantSym := map[string]bool{
    		// Verify these exist: (sanity checking this test)
    		"net/http.(*Client).do":           true,
    		"net/http.(*Transport).RoundTrip": true,
    
    		// Verify these don't exist:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Aug 22 18:18:19 UTC 2023
    - 5.2K bytes
    - Viewed (0)
  6. cmd/kubeadm/app/phases/addons/dns/dns_test.go

    		printManifest bool
    	}
    	tests := []struct {
    		name    string
    		args    args
    		wantOut string
    		wantErr bool
    	}{
    		{
    			name: "cfg is empty",
    			args: args{
    				cfg:           &kubeadmapi.ClusterConfiguration{},
    				client:        newMockClientForTest(t, 2, 1, "", "", ""),
    				printManifest: false,
    			},
    			wantOut: "",
    			wantErr: true,
    		},
    		{
    			name: "cfg is valid and not print Manifest",
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 11 10:21:20 UTC 2024
    - 41.7K bytes
    - Viewed (0)
  7. src/cmd/link/internal/ld/ld_test.go

    			out, err := cmd.CombinedOutput()
    			if err != nil {
    				t.Fatal(err)
    			}
    			got := strings.TrimSpace(string(out))
    			if got != tt.wantOut {
    				t.Errorf("got %q; want %q", got, tt.wantOut)
    			}
    		})
    	}
    }
    
    func TestRISCVTrampolines(t *testing.T) {
    	testenv.MustHaveGoBuild(t)
    	t.Parallel()
    
    	tmpDir := t.TempDir()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Oct 13 05:45:53 UTC 2023
    - 10.3K bytes
    - Viewed (0)
  8. pkg/controller/job/indexed_job_utils_test.go

    	cases := map[string]struct {
    		pods        []indexPhase
    		wantRm      []indexPhase
    		wantLeft    []indexPhase
    		completions int32
    	}{
    		"all unique": {
    			pods: []indexPhase{
    				{noIndex, v1.PodPending},
    				{"2", v1.PodPending},
    				{"5", v1.PodRunning},
    				{"6", v1.PodRunning},
    			},
    			wantRm: []indexPhase{
    				{noIndex, v1.PodPending},
    				{"6", v1.PodRunning},
    			},
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 27.9K bytes
    - Viewed (0)
  9. 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)
  10. 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)
Back to top