Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 115 for tc (0.05 sec)

  1. src/internal/syscall/unix/siginfo_linux_test.go

    		{"Pid", unsafe.Offsetof(si.Pid), ofPid},
    		{"Uid", unsafe.Offsetof(si.Uid), ofUid},
    		{"Status", unsafe.Offsetof(si.Status), ofStatus},
    	}
    
    	for _, tc := range offsets {
    		if int(tc.got) != tc.want {
    			t.Errorf("offsetof %s: got %d, want %d", tc.name, tc.got, tc.want)
    		}
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 01:23:00 UTC 2024
    - 1.3K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/pkg/cel/mutation/optional_test.go

    			expectedVal: celtypes.True,
    		},
    	} {
    		t.Run(tc.name, func(t *testing.T) {
    			_, option := NewTypeProviderAndEnvOption(&mockTypeResolverForOptional{
    				mockTypeResolver: &mockTypeResolver{},
    			})
    			env := mustCreateEnvWithOptional(t, option)
    			ast, issues := env.Compile(tc.expression)
    			if issues != nil {
    				if tc.expectedCompileError == "" {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Jan 25 21:52:39 UTC 2024
    - 4.9K bytes
    - Viewed (0)
  3. pkg/kubelet/winstats/perfcounters_test.go

    			expectedErrMsg: "unable to add process counter: foo. Error code is c0000bc0",
    		},
    	}
    
    	for name, tc := range testCases {
    		t.Run(name, func(t *testing.T) {
    			counter, err := newPerfCounter(tc.counter)
    			if tc.expectErr {
    				if err == nil || err.Error() != tc.expectedErrMsg {
    					t.Fatalf("expected error message `%s` but got `%v`", tc.expectedErrMsg, err)
    				}
    				return
    			}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Apr 25 14:24:16 UTC 2024
    - 3.5K bytes
    - Viewed (0)
  4. src/os/user/listgroups_unix_test.go

    func TestListGroups(t *testing.T) {
    	for _, tc := range listGroupsTests {
    		u := &User{Username: tc.user, Gid: tc.gid}
    		got, err := listGroupsFromReader(u, strings.NewReader(tc.in))
    		if tc.err {
    			if err == nil {
    				t.Errorf("listGroups(%q): got nil; want error", tc.user)
    			}
    			continue // no more checks
    		}
    		if err != nil {
    			t.Errorf("listGroups(%q): got %v error, want nil", tc.user, err)
    			continue // no more checks
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 3K bytes
    - Viewed (0)
  5. internal/bucket/lifecycle/expiration_test.go

    			expectedErr: errLifecycleDateNotMidnight,
    		},
    	}
    
    	for i, tc := range testCases {
    		t.Run(fmt.Sprintf("Test %d", i+1), func(t *testing.T) {
    			var expiration Expiration
    			err := xml.Unmarshal([]byte(tc.inputXML), &expiration)
    			if err != tc.expectedErr {
    				t.Fatalf("%d: Expected %v but got %v", i+1, tc.expectedErr, err)
    			}
    		})
    	}
    
    	validationTestCases := []struct {
    		inputXML    string
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Wed Feb 21 20:28:34 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apimachinery/pkg/runtime/serializer/cbor/internal/modes/encode_test.go

    		},
    	} {
    		encModes := tc.modes
    		if len(encModes) == 0 {
    			encModes = allEncModes
    		}
    
    		for _, encMode := range encModes {
    			modeName, ok := encModeNames[encMode]
    			if !ok {
    				t.Fatal("test case configured to run against unrecognized mode")
    			}
    
    			t.Run(fmt.Sprintf("mode=%s/%s", modeName, tc.name), func(t *testing.T) {
    				out, err := encMode.Marshal(tc.in)
    				tc.assertOnError(t, err)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Apr 04 15:55:02 UTC 2024
    - 2K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apiserver/pkg/admission/plugin/policy/validating/caching_authorizer_test.go

    				}
    				if err.Error() != invocation.expected.error.Error() {
    					t.Errorf("(call %d of %d) expected error %q, got %q", i+1, len(tc.calls), invocation.expected.error.Error(), err.Error())
    				}
    			}
    
    			if len(tc.backend) > misses {
    				t.Errorf("expected %d backend invocations, got %d", len(tc.backend), misses)
    			}
    		})
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Feb 12 18:58:24 UTC 2024
    - 6.3K bytes
    - Viewed (0)
  8. pkg/bootstrap/config_test.go

    				},
    			},
    			expectedVersion: "metadata-version",
    		},
    	}
    
    	for _, tc := range testCases {
    		t.Run(tc.name, func(t *testing.T) {
    			ret := SetIstioVersion(tc.meta)
    			if ret.IstioVersion != tc.expectedVersion {
    				t.Fatalf("SetIstioVersion: expected '%s', got '%s'", tc.expectedVersion, ret.IstioVersion)
    			}
    		})
    	}
    }
    
    func TestConvertNodeMetadata(t *testing.T) {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Mar 28 20:38:02 UTC 2024
    - 9.1K bytes
    - Viewed (0)
  9. src/crypto/tls/ech_test.go

    	} {
    		b, err := hex.DecodeString(tc.list)
    		if err != nil {
    			t.Fatal(err)
    		}
    		configs, err := parseECHConfigList(b)
    		if err != nil {
    			t.Fatal(err)
    		}
    		if len(configs) != tc.numConfigs {
    			t.Fatalf("unexpected number of configs parsed: got %d want %d", len(configs), tc.numConfigs)
    		}
    	}
    
    }
    
    func TestSkipBadConfigs(t *testing.T) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:10:12 UTC 2024
    - 2K bytes
    - Viewed (0)
  10. src/slices/iter_test.go

    			n:      2,
    			chunks: [][]int{{1, 2}, {3, 4}, {5}},
    		},
    	}
    
    	for _, tc := range cases {
    		t.Run(tc.name, func(t *testing.T) {
    			var chunks [][]int
    			for c := range Chunk(tc.s, tc.n) {
    				chunks = append(chunks, c)
    			}
    
    			if !chunkEqual(chunks, tc.chunks) {
    				t.Errorf("Chunk(%v, %d) = %v, want %v", tc.s, tc.n, chunks, tc.chunks)
    			}
    
    			if len(chunks) == 0 {
    				return
    			}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 10 17:28:50 UTC 2024
    - 5.7K bytes
    - Viewed (0)
Back to top