Search Options

Results per page
Sort
Preferred Languages
Advance

Results 71 - 80 of 414 for wantRm (0.11 sec)

  1. src/cmd/internal/quoted/quoted_test.go

    		{name: "two_tab", value: "a\tb", want: []string{"a", "b"}},
    		{name: "two_newline", value: "a\nb", want: []string{"a", "b"}},
    		{name: "quote_single", value: `'a b'`, want: []string{"a b"}},
    		{name: "quote_double", value: `"a b"`, want: []string{"a b"}},
    		{name: "quote_both", value: `'a '"b "`, want: []string{"a ", "b "}},
    		{name: "quote_contains", value: `'a "'"'b"`, want: []string{`a "`, `'b`}},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Oct 27 16:39:27 UTC 2021
    - 2.9K bytes
    - Viewed (0)
  2. operator/pkg/util/common_test.go

    			err:  errors.New(""),
    		},
    	}
    	for _, tt := range tests {
    		t.Run(tt.desc, func(t *testing.T) {
    			got, err := IsHTTPURL(tt.in)
    			if want, wantErr := tt.want, tt.err; !(got == want) || ((err == nil && wantErr != nil) || (err != nil && wantErr == nil)) {
    				t.Errorf("%s: got :%v, wanted output: %v, got error: %v, wanted error: %v", tt.desc, got, want, err, wantErr)
    			}
    		})
    	}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri May 29 20:42:01 UTC 2020
    - 2.2K bytes
    - Viewed (0)
  3. test/fixedbugs/issue31987.go

    package main
    
    import "fmt"
    
    type container struct {
    	Value string
    }
    
    func main() {
    	s := []container{
    		7: {Value: "string value"},
    	}
    	if s[7].Value != "string value" {
    		panic(fmt.Errorf("wanted \"string value\", got \"%s\"", s[7].Value))
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 14 16:36:38 UTC 2019
    - 414 bytes
    - Viewed (0)
  4. src/crypto/cipher/cipher_test.go

    	s := 16
    	pt := make([]byte, s)
    	ct := make([]byte, s)
    	for i := 0; i < 16; i++ {
    		pt[i], ct[i] = byte(i), byte(i)
    	}
    
    	assertEqual := func(name string, got, want []byte) {
    		if !bytes.Equal(got, want) {
    			t.Fatalf("%s: got %v, want %v", name, got, want)
    		}
    	}
    
    	for _, b := range []cipher.Block{a, d} {
    		iv := make([]byte, b.BlockSize())
    		cbce := cipher.NewCBCEncrypter(b, iv)
    		cbce.CryptBlocks(ct, pt[:0])
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 13 21:42:23 UTC 2016
    - 2.2K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apimachinery/pkg/watch/filter_test.go

    		event, ok := <-filtered.ResultChan()
    		if !ok {
    			break
    		}
    		got = append(got, string(event.Object.(testType)))
    	}
    
    	if e, a := []string{"foo", "qux", "zoo"}, got; !reflect.DeepEqual(e, a) {
    		t.Errorf("got %v, wanted %v", e, a)
    	}
    }
    
    func TestFilterStop(t *testing.T) {
    	source := NewFake()
    	filtered := Filter(source, func(e Event) (Event, bool) {
    		return e, e.Object.(testType)[0] != 'b'
    	})
    
    	go func() {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Nov 16 11:56:41 UTC 2021
    - 2.5K bytes
    - Viewed (0)
  6. src/internal/coverage/test/roundtrip_test.go

    	if nf != 0 {
    		t.Errorf("dec.NumFuncs(): got %d want %d", nf, 0)
    	}
    	pp := dec.PackagePath()
    	if pp != p {
    		t.Errorf("dec.PackagePath(): got %s want %s", pp, p)
    	}
    	ppn := dec.PackageName()
    	if ppn != pn {
    		t.Errorf("dec.PackageName(): got %s want %s", ppn, pn)
    	}
    	pmp := dec.ModulePath()
    	if pmp != mp {
    		t.Errorf("dec.ModulePath(): got %s want %s", pmp, mp)
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jan 20 21:42:05 UTC 2023
    - 8.5K bytes
    - Viewed (0)
  7. test/fixedbugs/issue30566a.go

    func identWrapper(s string) string { return ident(s) }
    
    func main() {
    	got := returnSecond((false || identWrapper("bad") != ""), ident("good"))
    	if got != "good" {
    		panic(fmt.Sprintf("wanted \"good\", got \"%s\"", got))
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 06 20:04:07 UTC 2019
    - 535 bytes
    - Viewed (0)
  8. test/fixedbugs/issue30566b.go

    // license that can be found in the LICENSE file.
    
    package main
    
    import (
    	"bytes"
    	"fmt"
    )
    
    func main() {
    	_, _ = false || g(1), g(2)
    	if !bytes.Equal(x, []byte{1, 2}) {
    		panic(fmt.Sprintf("wanted [1,2], got %v", x))
    	}
    }
    
    var x []byte
    
    //go:noinline
    func g(b byte) bool {
    	x = append(x, b)
    	return false
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 06 20:04:07 UTC 2019
    - 426 bytes
    - Viewed (0)
  9. src/internal/coverage/cfile/testdata/harness.go

    	log.SetPrefix("emitToUnwritableDir: ")
    
    	want := "permission denied"
    
    	if err := coverage.WriteMetaDir(*outdirflag); err == nil {
    		log.Fatal("expected error from WriteMetaDir to unwritable dir")
    	} else {
    		got := fmt.Sprintf("%v", err)
    		if !strings.Contains(got, want) {
    			log.Fatalf("meta-data emit to unwritable dir: wanted error containing %q got %q", want, got)
    		}
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 21 19:41:02 UTC 2024
    - 6.9K bytes
    - Viewed (0)
  10. staging/src/k8s.io/apiserver/pkg/authentication/request/headerrequest/requestheader_controller_test.go

    	if !equality.Semantic.DeepEqual(target.UsernameHeaders(), expected.usernameHeaders) {
    		t.Fatalf("incorrect usernameHeaders, got %v, wanted %v", target.UsernameHeaders(), expected.usernameHeaders)
    	}
    	if !equality.Semantic.DeepEqual(target.GroupHeaders(), expected.groupHeaders) {
    		t.Fatalf("incorrect groupHeaders, got %v, wanted %v", target.GroupHeaders(), expected.groupHeaders)
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Mar 07 14:37:01 UTC 2022
    - 9.3K bytes
    - Viewed (0)
Back to top