- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 17 for wantErr (0.09 seconds)
-
internal/arn/arn_test.go
}, wantArn: ARN{}, wantErr: true, }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { gotArn, err := Parse(tt.args.arnStr) if err == nil && tt.wantErr { t.Errorf("Parse() error = %v, wantErr %v", err, tt.wantErr) } if err != nil && !tt.wantErr { t.Errorf("Parse() error = %v, wantErr %v", err, tt.wantErr) } if err == nil {Created: Sun Apr 05 19:28:12 GMT 2026 - Last Modified: Thu Apr 04 08:31:34 GMT 2024 - 5.1K bytes - Click Count (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",Created: Sun Apr 05 19:28:12 GMT 2026 - Last Modified: Fri Aug 29 02:39:48 GMT 2025 - 12.3K bytes - Click Count (0) -
cmd/batch-handlers_test.go
want: []string{"foo", "bar"}, }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { if err := yaml.Unmarshal([]byte(tt.args.yamlStr), &tt.b); (err != nil) != tt.wantErr { t.Errorf("UnmarshalYAML() error = %v, wantErr %v", err, tt.wantErr) } if !slices.Equal(tt.b.Prefix.F(), tt.want) { t.Errorf("UnmarshalYAML() = %v, want %v", tt.b.Prefix.F(), tt.want) } }) }Created: Sun Apr 05 19:28:12 GMT 2026 - Last Modified: Thu Aug 01 12:53:30 GMT 2024 - 1.7K bytes - Click Count (0) -
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
Created: Tue Apr 07 11:13:11 GMT 2026 - Last Modified: Tue Dec 30 15:28:53 GMT 2025 - 47.5K bytes - Click Count (0) -
internal/event/target/nsq_test.go
Topic: "topic", }, wantErr: true, }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { n := NSQArgs{ Enable: tt.fields.Enable, NSQDAddress: tt.fields.NSQDAddress, Topic: tt.fields.Topic, } if err := n.Validate(); (err != nil) != tt.wantErr { t.Errorf("NSQArgs.Validate() error = %v, wantErr %v", err, tt.wantErr) } }) }
Created: Sun Apr 05 19:28:12 GMT 2026 - Last Modified: Fri May 24 23:05:23 GMT 2024 - 2.2K bytes - Click Count (0) -
misc/go_android_exec/exitcode_test.go
// We should get a no exit code error if err == nil || !wantErr.MatchString(err.Error()) { t.Errorf("want error matching %s, got %s", wantErr, err) } // And it should flush all output (even if it looks // like we may be getting an exit code) if got := out.String(); text != got { t.Errorf("want full output %q, got %q", text, got) } } wantErr = regexp.MustCompile("^no exit code") check("abc") check("exitcode")
Created: Tue Apr 07 11:13:11 GMT 2026 - Last Modified: Wed May 03 14:54:58 GMT 2023 - 2.1K bytes - Click Count (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 }
Created: Tue Apr 07 11:13:11 GMT 2026 - Last Modified: Mon Dec 15 16:34:13 GMT 2025 - 40.2K bytes - Click Count (0) -
internal/s3select/csv/reader_contrib_test.go
Created: Sun Apr 05 19:28:12 GMT 2026 - Last Modified: Fri Aug 29 02:39:48 GMT 2025 - 38.4K bytes - Click Count (0) -
src/bufio/bufio_test.go
br := NewReaderSize(r, size) want := func(s string, wantErr error) { p := make([]byte, 50) n, err := br.Read(p) if err != wantErr || n != len(s) || string(p[:n]) != s { t.Fatalf("read(%d) = %q, %v, want %q, %v", len(p), string(p[:n]), err, s, wantErr) } t.Logf("read(%d) = %q, %v", len(p), string(p[:n]), err) } want("abc", nil)
Created: Tue Apr 07 11:13:11 GMT 2026 - Last Modified: Fri Feb 07 01:08:54 GMT 2025 - 51.6K bytes - Click Count (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},
Created: Sun Apr 05 19:28:12 GMT 2026 - Last Modified: Fri Aug 22 14:15:21 GMT 2025 - 7.1K bytes - Click Count (0)