- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 10 for wantErr (0.09 sec)
-
src/archive/tar/reader_test.go
} func TestFileReader(t *testing.T) { type ( testRead struct { // Read(cnt) == (wantStr, wantErr) cnt int wantStr string wantErr error } testWriteTo struct { // WriteTo(testFile{ops}) == (wantCnt, wantErr) ops fileOps wantCnt int64 wantErr error } testRemaining struct { // logicalRemaining() == wantLCnt, physicalRemaining() == wantPCnt
Registered: Tue Dec 30 11:13:12 UTC 2025 - Last Modified: Mon Dec 15 16:34:13 UTC 2025 - 47.5K bytes - Viewed (0) -
schema/serializer_test.go
wantErr: false, }, { name: "invalid type", value: "invalid", want: nil, wantErr: true, }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { got, err := UnixSecondSerializer{}.Value(context.Background(), nil, reflect.Value{}, tt.value) if (err != nil) != tt.wantErr { t.Fatalf("UnixSecondSerializer.Value() error = %v, wantErr %v", err, tt.wantErr) }Registered: Sun Dec 28 09:35:17 UTC 2025 - Last Modified: Sun Oct 26 12:29:44 UTC 2025 - 4.8K bytes - Viewed (0) -
cmd/postpolicyform_test.go
fv formValues expired bool wantErr string } // Test case just contains fields we override from defaultFormVals. testCases := []testCase{ { name: "happy path no errors", fv: defaultFormVals.Clone(), wantErr: "", }, { name: "expired policy document", fv: defaultFormVals.Clone(), expired: true, wantErr: "Invalid according to Policy: Policy expired",Registered: Sun Dec 28 19:28:13 UTC 2025 - Last Modified: Fri Aug 29 02:39:48 UTC 2025 - 12.3K bytes - Viewed (0) -
src/archive/tar/writer_test.go
type ( testHeader struct { // WriteHeader(hdr) == wantErr hdr Header wantErr error } testWrite struct { // Write(str) == (wantCnt, wantErr) str string wantCnt int wantErr error } testReadFrom struct { // ReadFrom(testFile{ops}) == (wantCnt, wantErr) ops fileOps wantCnt int64 wantErr error } testClose struct { // Close() == wantErr wantErr error }
Registered: Tue Dec 30 11:13:12 UTC 2025 - Last Modified: Mon Dec 15 16:34:13 UTC 2025 - 40.2K bytes - Viewed (0) -
cmd/streaming-signature-v4_test.go
} for _, tt := range tests { got, err := parseHexUint([]byte(tt.in)) if tt.wantErr != "" { if err != nil && !strings.Contains(err.Error(), tt.wantErr) { t.Errorf("parseHexUint(%q) = %v, %v; want error %q", tt.in, got, err, tt.wantErr) } } else { if err != nil || got != tt.want { t.Errorf("parseHexUint(%q) = %v, %v; want %v", tt.in, got, err, tt.want) }Registered: Sun Dec 28 19:28:13 UTC 2025 - Last Modified: Fri Aug 29 02:39:48 UTC 2025 - 5.7K bytes - Viewed (0) -
internal/s3select/csv/reader_contrib_test.go
Registered: Sun Dec 28 19:28:13 UTC 2025 - Last Modified: Fri Aug 29 02:39:48 UTC 2025 - 38.4K bytes - Viewed (0) -
internal/hash/checksum_test.go
// TestChecksumAddToHeader tests that adding and retrieving a checksum on a header works func TestChecksumAddToHeader(t *testing.T) { tests := []struct { name string checksum ChecksumType fullobj bool wantErr bool }{ {"CRC32-composite", ChecksumCRC32, false, false}, {"CRC32-full-object", ChecksumCRC32, true, false}, {"CRC32C-composite", ChecksumCRC32C, false, false}, {"CRC32C-full-object", ChecksumCRC32C, true, false},
Registered: Sun Dec 28 19:28:13 UTC 2025 - Last Modified: Fri Aug 22 14:15:21 UTC 2025 - 7.1K bytes - Viewed (0) -
internal/s3select/select_test.go
if err != nil { if !testCase.wantErr { t.Fatal(err) } t.Logf("got expected error: %v", err) return } if err = s3Select.Open(newBytesRSC(testCase.input)); err != nil { if !testCase.wantErr { t.Fatal(err) } t.Logf("got expected error: %v", err) return } else if testCase.wantErr { t.Error("did not get expected error")Registered: Sun Dec 28 19:28:13 UTC 2025 - Last Modified: Fri Aug 29 02:39:48 UTC 2025 - 76.1K bytes - Viewed (0) -
src/archive/zip/reader_test.go
if err != nil { if !test.wantErr { t.Errorf("%s: %v", path, err) } sawErr = true return nil } files = append(files, path) return nil }) if err != nil { t.Errorf("fs.WalkDir error: %v", err) } if test.wantErr && !sawErr { t.Error("succeeded but want error") } else if !test.wantErr && sawErr { t.Error("unexpected error")Registered: Tue Dec 30 11:13:12 UTC 2025 - Last Modified: Fri Oct 17 20:10:27 UTC 2025 - 56.5K bytes - Viewed (0) -
cmd/object-handlers_test.go
} var apiErr APIErrorResponse err = xml.Unmarshal(b, &apiErr) if err != nil { t.Fatal(err) } gotErr := apiErr.Code wantErr := testCase.wantAPICode if gotErr != wantErr { t.Errorf("test %d: want api error %q, got %q", i, wantErr, gotErr) } if testCase.wantHeaders != nil { for k, v := range testCase.wantHeaders { got := rec.Header().Get(k) if got != v {
Registered: Sun Dec 28 19:28:13 UTC 2025 - Last Modified: Sun Sep 28 20:59:21 UTC 2025 - 163.1K bytes - Viewed (0)