- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for slice_v1 (0.15 sec)
-
test/escape_slice.go
return s[0] } func slice10() []*int { i := 0 // ERROR "moved to heap: i" s := []*int{&i} // ERROR "\[\]\*int{...} escapes to heap" return s } func slice11() { i := 2 s := make([]int, 2, 3) // ERROR "make\(\[\]int, 2, 3\) does not escape" s = make([]int, i, 3) // ERROR "make\(\[\]int, i, 3\) does not escape"
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Sep 08 18:50:24 UTC 2023 - 3.9K bytes - Viewed (0) -
pilot/pkg/serviceregistry/kube/controller/endpointslice_test.go
cache := newEndpointSliceCache() hostname := host.Name("foo") // add a endpoint ep1 := &model.IstioEndpoint{ Address: "1.2.3.4", ServicePortName: "http", } cache.Update(hostname, "slice1", []*model.IstioEndpoint{ep1}) if !testEndpointsEqual(cache.Get(hostname), []*model.IstioEndpoint{ep1}) { t.Fatalf("unexpected endpoints") } if !cache.Has(hostname) { t.Fatalf("expect to find the host name") }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Mon Aug 14 18:50:38 UTC 2023 - 4.5K bytes - Viewed (0) -
src/encoding/gob/type_test.go
t.Errorf("array printed as %q; expected %q", str, expected) } } func TestSliceType(t *testing.T) { var s []int sint := getTypeUnlocked("slice", reflect.TypeOf(s)) var news []int newsint := getTypeUnlocked("slice1", reflect.TypeOf(news)) if sint != newsint { t.Errorf("second registration of []int creates new type") } var b []bool sbool := getTypeUnlocked("", reflect.TypeOf(b)) if sbool == sint {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Aug 01 14:26:13 UTC 2023 - 6.1K bytes - Viewed (0)