Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for wantbool (0.46 sec)

  1. src/database/sql/convert_test.go

    		// True bools
    		{s: true, d: &scanbool, wantbool: true},
    		{s: "True", d: &scanbool, wantbool: true},
    		{s: "TRUE", d: &scanbool, wantbool: true},
    		{s: "1", d: &scanbool, wantbool: true},
    		{s: 1, d: &scanbool, wantbool: true},
    		{s: int64(1), d: &scanbool, wantbool: true},
    		{s: uint16(1), d: &scanbool, wantbool: true},
    
    		// False bools
    		{s: false, d: &scanbool, wantbool: false},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 10 20:23:22 UTC 2024
    - 17K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/pkg/endpoints/handlers/responsewriters/writers_test.go

    		wantCode    int
    		wantHeaders http.Header
    		wantBody    []byte
    	}{
    		{
    			name:        "serialize object",
    			out:         smallPayload,
    			req:         &http.Request{Header: http.Header{}, URL: &url.URL{Path: "/path"}},
    			wantCode:    http.StatusOK,
    			wantHeaders: http.Header{"Content-Type": []string{""}},
    			wantBody:    smallPayload,
    		},
    
    		{
    			name:        "return content type",
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 15.7K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/validation_test.go

    		func(s *JSON, c fuzz.Continue) {
    			if c.RandBool() {
    				s.Object = float64(42.0)
    			}
    		},
    		func(s **StructuralOrBool, c fuzz.Continue) {
    			if c.RandBool() {
    				*s = &StructuralOrBool{}
    			}
    		},
    		func(s **Structural, c fuzz.Continue) {
    			if c.RandBool() {
    				*s = &Structural{}
    			}
    		},
    		func(s *Structural, c fuzz.Continue) {
    			if c.RandBool() {
    				*s = Structural{}
    			}
    		},
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 31 18:20:00 UTC 2024
    - 11.6K bytes
    - Viewed (0)
  4. src/net/http/clientserver_test.go

    func testHandlerWritesTooMuch(t *testing.T, mode testMode) {
    	wantBody := []byte("123")
    	cst := newClientServerTest(t, mode, HandlerFunc(func(w ResponseWriter, r *Request) {
    		rc := NewResponseController(w)
    		w.Header().Set("Content-Length", fmt.Sprintf("%v", len(wantBody)))
    		rc.Flush()
    		w.Write(wantBody)
    		rc.Flush()
    		n, err := io.WriteString(w, "x") // too many
    		if err == nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 46.6K bytes
    - Viewed (0)
  5. pkg/apis/core/fuzzer/fuzzer.go

    		func(ev *core.EnvFromSource, c fuzz.Continue) {
    			if c.RandBool() {
    				ev.Prefix = "p_"
    			}
    			if c.RandBool() {
    				c.Fuzz(&ev.ConfigMapRef)
    			} else {
    				c.Fuzz(&ev.SecretRef)
    			}
    		},
    		func(cm *core.ConfigMapEnvSource, c fuzz.Continue) {
    			c.FuzzNoCustom(cm) // fuzz self without calling this function again
    			if c.RandBool() {
    				opt := c.RandBool()
    				cm.Optional = &opt
    			}
    		},
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Feb 26 04:32:01 UTC 2024
    - 18.5K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apimachinery/pkg/apis/meta/fuzzer/fuzzer.go

    			*q = *resource.NewQuantity(c.Int63n(1000), resource.DecimalExponent)
    		},
    		func(j *int, c fuzz.Continue) {
    			*j = int(c.Int31())
    		},
    		func(j **int, c fuzz.Continue) {
    			if c.RandBool() {
    				i := int(c.Int31())
    				*j = &i
    			} else {
    				*j = nil
    			}
    		},
    		func(j *runtime.TypeMeta, c fuzz.Continue) {
    			// We have to customize the randomization of TypeMetas because their
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 03 15:12:26 UTC 2024
    - 9.9K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apiextensions-apiserver/pkg/controller/openapi/v2/conversion_test.go

    		randSource := rand.New(rand.NewSource(seed))
    		f.RandSource(randSource)
    		t.Logf("iteration %d with seed %d", i, seed)
    
    		fuzzFuncs(f, func(ref *spec.Ref, c fuzz.Continue, visible bool) {
    			var url string
    			if c.RandBool() {
    				url = fmt.Sprintf("http://%d", c.Intn(100000))
    			} else {
    				url = "#/definitions/test"
    			}
    			r, err := spec.NewRef(url)
    			if err != nil {
    				t.Fatalf("failed to fuzz ref: %v", err)
    			}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jun 02 14:34:26 UTC 2023
    - 23.2K bytes
    - Viewed (0)
  8. internal/s3select/sql/funceval.go

    	return fmt.Errorf("Cannot cast from %v to %v", fromType, toType)
    }
    
    func errCastFailure(msg string) error {
    	return fmt.Errorf("Error casting: %s", msg)
    }
    
    // Allowed cast types
    const (
    	castBool      = "BOOL"
    	castInt       = "INT"
    	castInteger   = "INTEGER"
    	castString    = "STRING"
    	castFloat     = "FLOAT"
    	castDecimal   = "DECIMAL"
    	castNumeric   = "NUMERIC"
    	castTimestamp = "TIMESTAMP"
    )
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Tue Jun 01 21:59:40 UTC 2021
    - 13.2K bytes
    - Viewed (0)
  9. src/go/build/deps_test.go

    	if err != nil {
    		t.Fatal(err)
    	}
    	t.Logf("go/build imports %q", imports)
    	want := []string{"bytes", "os", "path/filepath", "strings"}
    wantLoop:
    	for _, w := range want {
    		for _, imp := range imports {
    			if imp == w {
    				continue wantLoop
    			}
    		}
    		t.Errorf("expected to find %q in import list", w)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 24 16:41:13 UTC 2024
    - 19.2K bytes
    - Viewed (0)
Back to top