- Sort Score
- Result 10 results
- Languages All
Results 111 - 120 of 3,055 for REFLECT (0.11 sec)
-
utils/utils.go
} } return false } func AssertEqual(x, y interface{}) bool { if reflect.DeepEqual(x, y) { return true } if x == nil || y == nil { return false } xval := reflect.ValueOf(x) yval := reflect.ValueOf(y) if xval.Kind() == reflect.Ptr && xval.IsNil() || yval.Kind() == reflect.Ptr && yval.IsNil() { return false } if valuer, ok := x.(driver.Valuer); ok {
Registered: Wed Jun 12 16:27:09 UTC 2024 - Last Modified: Mon Apr 22 06:43:02 UTC 2024 - 3.8K bytes - Viewed (0) -
test/fixedbugs/issue48357.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Sep 13 18:38:15 UTC 2021 - 360 bytes - Viewed (0) -
src/cmd/go/internal/generate/generate_test.go
for _, test := range splitTests { // First with newlines. got := g.split("//go:generate " + test.in + "\n") if !reflect.DeepEqual(got, test.out) { t.Errorf("split(%q): got %q expected %q", test.in, got, test.out) } // Then with CRLFs, thank you Windows. got = g.split("//go:generate " + test.in + "\r\n") if !reflect.DeepEqual(got, test.out) { t.Errorf("split(%q): got %q expected %q", test.in, got, test.out) } } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Apr 20 14:09:12 UTC 2022 - 7.4K bytes - Viewed (0) -
src/internal/unsafeheader/unsafeheader_test.go
import ( "bytes" "internal/unsafeheader" "reflect" "testing" "unsafe" ) // TestTypeMatchesReflectType ensures that the name and layout of the // unsafeheader types matches the corresponding Header types in the reflect // package. func TestTypeMatchesReflectType(t *testing.T) { t.Run("Slice", func(t *testing.T) { testHeaderMatchesReflect(t, unsafeheader.Slice{}, reflect.SliceHeader{}) })
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Dec 13 18:45:54 UTC 2021 - 2.9K bytes - Viewed (0) -
test/reflectmethod5.go
// license that can be found in the LICENSE file. // Issue 38515: failed to mark the method wrapper // reflect.Type.Method itself as REFLECTMETHOD. package main import "reflect" var called bool type foo struct{} func (foo) X() { called = true } var h = reflect.Type.Method func main() { v := reflect.ValueOf(foo{}) m := h(v.Type(), 0) f := m.Func.Interface().(func(foo)) f(foo{}) if !called {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sun Apr 19 03:12:32 UTC 2020 - 544 bytes - Viewed (0) -
test/recover.go
return nil } func test15() { f := reflect.MakeFunc(reflect.TypeOf((func())(nil)), reflectFunc).Interface().(func()) defer f() panic(15) } func reflectFunc2(args []reflect.Value) (results []reflect.Value) { // This will call reflectFunc3 args[0].Interface().(func())() return nil } func reflectFunc3(args []reflect.Value) (results []reflect.Value) { if v := recover(); v != nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 02 13:43:18 UTC 2016 - 10.6K bytes - Viewed (0) -
src/cmd/fix/cftype.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Aug 07 00:25:49 UTC 2023 - 3.5K bytes - Viewed (0) -
test/reflectmethod7.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Oct 26 14:24:17 UTC 2021 - 421 bytes - Viewed (0) -
test/fixedbugs/issue15439.go
// license that can be found in the LICENSE file. package main import "reflect" func main() { a := &struct{ x int }{} b := &struct{ x int "" }{} ta := reflect.TypeOf(a) tb := reflect.TypeOf(b) // Ensure cmd/compile treats absent and empty tags as equivalent. a = b // Ensure package reflect treats absent and empty tags as equivalent. if !tb.AssignableTo(ta) { panic("fail") }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Apr 25 21:28:45 UTC 2016 - 514 bytes - Viewed (0) -
test/ken/cplx3.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Feb 24 05:24:24 UTC 2012 - 888 bytes - Viewed (0)