Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for TestIndex (0.19 sec)

  1. src/index/suffixarray/suffixarray_test.go

    		testLookups(t, &tc, x, 2e9)
    		testLookups(t, &tc, x, -1)
    	}
    }
    
    func TestIndex32(t *testing.T) {
    	testIndex(t)
    }
    
    func TestIndex64(t *testing.T) {
    	maxData32 = -1
    	defer func() {
    		maxData32 = realMaxData32
    	}()
    	testIndex(t)
    }
    
    func TestNew32(t *testing.T) {
    	test(t, func(x []byte) []int {
    		sa := make([]int32, len(x))
    		text_32(x, sa)
    		out := make([]int, len(sa))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 14.1K bytes
    - Viewed (0)
  2. pkg/kube/krt/index_test.go

    	"istio.io/istio/pkg/kube/kclient/clienttest"
    	"istio.io/istio/pkg/kube/krt"
    	"istio.io/istio/pkg/ptr"
    	"istio.io/istio/pkg/slices"
    	"istio.io/istio/pkg/test"
    	"istio.io/istio/pkg/test/util/assert"
    )
    
    func TestIndex(t *testing.T) {
    	c := kube.NewFakeClient()
    	kpc := kclient.New[*corev1.Pod](c)
    	pc := clienttest.Wrap(t, kpc)
    	pods := krt.WrapClient[*corev1.Pod](kpc)
    	stop := test.NewStop(t)
    	c.RunAndWait(stop)
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Apr 09 19:55:53 UTC 2024
    - 4.5K bytes
    - Viewed (0)
  3. pilot/pkg/serviceregistry/util/workloadinstances/index_test.go

    		},
    		WorkloadSelector: &networking.WorkloadSelector{
    			Labels: map[string]string{"app": "wle"},
    		},
    		Resolution: networking.ServiceEntry_STATIC,
    	},
    }
    
    func TestIndex(t *testing.T) {
    	// Setup a couple of workload instances for test
    	wi1 := &model.WorkloadInstance{
    		Name:      selector.Name,
    		Namespace: selector.Namespace,
    		Endpoint: &model.IstioEndpoint{
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu May 23 21:07:03 UTC 2024
    - 5K bytes
    - Viewed (0)
  4. src/syscall/js/js_test.go

    	if dummys.Call("hasOwnProperty", "test").Bool() {
    		t.Errorf("property still exists")
    	}
    
    	expectValueError(t, func() {
    		dummys.Get("zero").Delete("badField")
    	})
    }
    
    func TestIndex(t *testing.T) {
    	if got := dummys.Get("someArray").Index(1).Int(); got != 42 {
    		t.Errorf("got %#v, want %#v", got, 42)
    	}
    
    	expectValueError(t, func() {
    		dummys.Get("zero").Index(1)
    	})
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 19 14:35:26 UTC 2024
    - 17.7K bytes
    - Viewed (0)
  5. src/slices/slices_test.go

    		0,
    		-1,
    	},
    	{
    		[]int{1, 2, 3},
    		2,
    		1,
    	},
    	{
    		[]int{1, 2, 2, 3},
    		2,
    		1,
    	},
    	{
    		[]int{1, 2, 3, 2},
    		2,
    		1,
    	},
    }
    
    func TestIndex(t *testing.T) {
    	for _, test := range indexTests {
    		if got := Index(test.s, test.v); got != test.want {
    			t.Errorf("Index(%v, %v) = %d, want %d", test.s, test.v, got, test.want)
    		}
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 26 13:32:06 UTC 2024
    - 33.2K bytes
    - Viewed (0)
  6. src/strings/strings_test.go

    	for _, test := range testCases {
    		actual := f(test.s, test.sep)
    		if actual != test.out {
    			t.Errorf("%s(%q,%q) = %v; want %v", funcName, test.s, test.sep, actual, test.out)
    		}
    	}
    }
    
    func TestIndex(t *testing.T)     { runIndexTests(t, Index, "Index", indexTests) }
    func TestLastIndex(t *testing.T) { runIndexTests(t, LastIndex, "LastIndex", lastIndexTests) }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 12:58:37 UTC 2024
    - 53K bytes
    - Viewed (0)
  7. src/bytes/bytes_test.go

    	for _, test := range testCases {
    		a := []byte(test.a)
    		actual := f(a, test.b)
    		if actual != test.i {
    			t.Errorf("%s(%q,%q) = %v; want %v", funcName, a, test.b, actual, test.i)
    		}
    	}
    }
    
    func TestIndex(t *testing.T)     { runIndexTests(t, Index, "Index", indexTests) }
    func TestLastIndex(t *testing.T) { runIndexTests(t, LastIndex, "LastIndex", lastIndexTests) }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 12:58:37 UTC 2024
    - 56.5K bytes
    - Viewed (0)
  8. src/reflect/all_test.go

    		}
    	})
    }
    
    func TestSmallNegativeInt(t *testing.T) {
    	i := int16(-1)
    	v := ValueOf(i)
    	if v.Int() != -1 {
    		t.Errorf("int16(-1).Int() returned %v", v.Int())
    	}
    }
    
    func TestIndex(t *testing.T) {
    	xs := []byte{1, 2, 3, 4, 5, 6, 7, 8}
    	v := ValueOf(xs).Index(3).Interface().(byte)
    	if v != xs[3] {
    		t.Errorf("xs.Index(3) = %v; expected %v", v, xs[3])
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 218.8K bytes
    - Viewed (0)
Back to top