Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 7,211 for case2 (0.09 sec)

  1. cmd/kubeadm/app/util/version_test.go

    				}
    				return "Unknown test case key!", errors.New("unknown test case key")
    			}
    
    			ver, err := kubernetesReleaseVersion(k, fileFetcher)
    			t.Logf("Key: %q. Result: %q, Error: %v", k, ver, err)
    			switch {
    			case err != nil && !v.ErrorExpected:
    				t.Errorf("kubernetesReleaseVersion: unexpected error for %q. Error: %+v", k, err)
    			case err == nil && v.ErrorExpected:
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Apr 26 03:30:51 UTC 2024
    - 15K bytes
    - Viewed (0)
  2. test/return.go

    	select {
    	case <-c:
    		print(2)
    		panic("abc")
    	case c <- 1:
    		print(2)
    		goto L
    	}
    }
    
    func _() int {
    	print(1)
    	select {
    	case <-c:
    		print(2)
    		panic("abc")
    	default:
    		select{}
    	}
    }
    
    // if any cases don't terminate, the select isn't okay anymore
    
    func _() int {
    	print(1)
    	select {
    	case <-c:
    		print(2)
    	}
    } // ERROR "missing return"
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 02 13:43:18 UTC 2016
    - 32.7K bytes
    - Viewed (0)
  3. test/chan/select5.go

    	default:
    		panic("nonblock")
    	{{end}}
    	{{/*  Receive from c.  Different cases are direct, indirect, :=, interface, and map assignment. */}}
    	{{if .Maybe}}
    	case *fp(&x, 100) = <-fc(c, 1):
    	{{else}}{{if .Maybe}}
    	case y := <-fc(c, 1):
    		x = y
    	{{else}}{{if .Maybe}}
    	case i = <-fc(c, 1):
    		x = i.(int)
    	{{else}}
    	case m[fn(13, 100)] = <-fc(c, 1):
    		x = m[13]
    	{{end}}{{end}}{{end}}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 02 13:43:18 UTC 2016
    - 10K bytes
    - Viewed (0)
  4. cni/pkg/install/cniconfig_test.go

    					}
    					t.Fatalf("did not expect to retrieve a CNI config file %s", result)
    				}
    				// Successful test for non-delayed cases
    				return
    			case err := <-errChan:
    				t.Fatal(err)
    			case <-time.After(250 * time.Millisecond):
    				if len(c.delayedConfName) > 0 {
    					// Delayed case
    					// Write delayed CNI config file
    					data, err := os.ReadFile(filepath.Join("testdata", c.delayedConfName))
    					if err != nil {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue May 21 18:32:01 UTC 2024
    - 15.4K bytes
    - Viewed (0)
  5. src/math/atanh.go

    	const NearZero = 1.0 / (1 << 28) // 2**-28
    	// special cases
    	switch {
    	case x < -1 || x > 1 || IsNaN(x):
    		return NaN()
    	case x == 1:
    		return Inf(1)
    	case x == -1:
    		return Inf(-1)
    	}
    	sign := false
    	if x < 0 {
    		x = -x
    		sign = true
    	}
    	var temp float64
    	switch {
    	case x < NearZero:
    		temp = x
    	case x < 0.5:
    		temp = x + x
    		temp = 0.5 * Log1p(temp+temp*x/(1-x))
    	default:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 11 16:34:30 UTC 2022
    - 2K bytes
    - Viewed (0)
  6. test/switch7.go

    // Verify that type switch statements with duplicate cases are detected
    // by the compiler.
    // Does not compile.
    
    package main
    
    import "fmt"
    
    func f4(e interface{}) {
    	switch e.(type) {
    	case int:
    	case int: // ERROR "duplicate case int in type switch"
    	case int64:
    	case error:
    	case error: // ERROR "duplicate case error in type switch"
    	case fmt.Stringer:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Dec 14 21:28:48 UTC 2020
    - 796 bytes
    - Viewed (0)
  7. src/cmd/gofmt/testdata/typeswitch.input

    	switch (x.(type)) { // should become: switch x.(type) {
    	}
    
    	switch x.(type) { // should remain the same
    	case int:
    	}
    	switch (x.(type)) { // should become: switch x.(type) {
    	case int:
    	}
    
    	switch x.(type) { // should remain the same
    	case []int:
    	}
    
    	// Parenthesized (x.(type)) in type switches containing cases
    	// with unnamed (literal) types were never permitted by gofmt;
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 15 17:17:30 UTC 2022
    - 1.4K bytes
    - Viewed (0)
  8. test/switch6.go

    package main
    
    // Verify that type switch statements with impossible cases are detected by the compiler.
    func f0(e error) {
    	switch e.(type) {
    	case int: // ERROR "impossible type switch case: (int\n\t)?e \(.*type error\) cannot have dynamic type int \(missing method Error\)"
    	}
    }
    
    // Verify that the compiler rejects multiple default cases.
    func f1(e interface{}) {
    	switch e {
    	default:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Sep 24 17:04:15 UTC 2022
    - 1.1K bytes
    - Viewed (0)
  9. src/math/jn.go

    // Jn returns the order-n Bessel function of the first kind.
    //
    // Special cases are:
    //
    //	Jn(n, ±Inf) = 0
    //	Jn(n, NaN) = NaN
    func Jn(n int, x float64) float64 {
    	const (
    		TwoM29 = 1.0 / (1 << 29) // 2**-29 0x3e10000000000000
    		Two302 = 1 << 302        // 2**302 0x52D0000000000000
    	)
    	// special cases
    	switch {
    	case IsNaN(x):
    		return x
    	case IsInf(x, 0):
    		return 0
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 11 16:34:30 UTC 2022
    - 7.2K bytes
    - Viewed (0)
  10. istioctl/pkg/kubeinject/kubeinject_test.go

    	"istio.io/istio/istioctl/pkg/util/testutil"
    )
    
    func TestKubeInject(t *testing.T) {
    	cases := []testutil.TestCase{
    		{ // case 0
    			Args:           []string{},
    			ExpectedRegexp: regexp.MustCompile(`filename not specified \(see --filename or -f\)`),
    			WantException:  true,
    		},
    		{ // case 1
    			Args:           strings.Split("-f missing.yaml", " "),
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Jun 15 15:02:17 UTC 2023
    - 3.4K bytes
    - Viewed (0)
Back to top