Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 24 for wantSum (0.09 sec)

  1. src/cmd/go/internal/modfetch/zip_sum_test/zip_sum_test.go

    				}
    				return
    			}
    
    			sum := modfetch.Sum(ctx, test.m)
    			if sum != test.wantSum {
    				if *updateTestData {
    					t.Logf("%s: updating content sum to %s", test.m, sum)
    					test.wantSum = sum
    					needUpdate = true
    				} else {
    					t.Errorf("%s: got content sum %s; want sum %s", test.m, sum, test.wantSum)
    					return
    				}
    			}
    
    			h := sha256.New()
    			f, err := os.Open(zipPath)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 18 19:33:59 UTC 2023
    - 6.2K bytes
    - Viewed (0)
  2. 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)
  3. 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)
  4. src/net/http/httputil/dump_test.go

    			}
    			return req
    		}
    
    		if tt.WantDump != "" {
    			req := freshReq(tt)
    			dump, err := DumpRequest(req, !tt.NoBody)
    			if err != nil {
    				t.Errorf("DumpRequest #%d: %s\nWantDump:\n%s", i, err, tt.WantDump)
    				continue
    			}
    			if string(dump) != tt.WantDump {
    				t.Errorf("DumpRequest %d, expecting:\n%s\nGot:\n%s\n", i, tt.WantDump, string(dump))
    				continue
    			}
    		}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 06 17:34:07 UTC 2022
    - 12.5K bytes
    - Viewed (0)
  5. src/cmd/go/internal/work/shell_test.go

    			t.Skipf("skipping %#q: contains no arguments", b)
    		}
    
    		var buf strings.Builder
    		for _, arg := range args {
    			buf.WriteString(arg)
    			buf.WriteString("\n")
    		}
    		wantOut := buf.String()
    
    		if strings.Count(wantOut, "\n") != len(args)+bytes.Count(b, []byte("\n")) {
    			// One of the newlines in b was treated as a delimiter and not part of an
    			// argument. Our bash test script would interpret that as a syntax error.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Feb 15 15:30:05 UTC 2023
    - 4.5K bytes
    - Viewed (0)
  6. pilot/pkg/status/distribution/state_test.go

    	_ = json.Unmarshal(b, &x)
    	type args struct {
    		in any
    	}
    	tests := []struct {
    		name    string
    		args    args
    		wantOut *v1alpha1.IstioStatus
    		wantErr bool
    	}{
    		{
    			name:    "Nondestructive cast",
    			args:    args{in: statusStillPropagating},
    			wantOut: statusStillPropagating,
    		},
    	}
    	for _, tt := range tests {
    		t.Run(tt.name, func(t *testing.T) {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Aug 22 22:47:47 UTC 2022
    - 4.3K bytes
    - Viewed (0)
  7. 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)
  8. src/mime/multipart/writer_test.go

    			} else if b := params["boundary"]; b != tt.b {
    				t.Errorf("unexpected boundary parameter %q; want %q", b, tt.b)
    			}
    
    			w.Close()
    			wantSub := "\r\n--" + tt.b + "--\r\n"
    			if got := b.String(); !strings.Contains(got, wantSub) {
    				t.Errorf("expected %q in output. got: %q", wantSub, got)
    			}
    		}
    	}
    }
    
    func TestWriterBoundaryGoroutines(t *testing.T) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 06 17:36:47 UTC 2022
    - 4.1K bytes
    - Viewed (0)
  9. 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)
  10. 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)
Back to top