- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 381 for valueDoc (0.47 sec)
-
testing/internal-performance-testing/src/test/groovy/org/gradle/performance/measure/AmountTest.groovy
def "can add amounts with different units of same quantity"() { def sum = Amount.valueOf(valueA, unitsA) + Amount.valueOf(valueB, unitsB) expect: sum == Amount.valueOf(valueC, unitsC) sum.toString() == Amount.valueOf(valueC, unitsC).toString() where: valueA | unitsA | valueB | unitsB | valueC | unitsC 0 | Fruit.apples | 0 | Fruit.oranges | 0 | Fruit.apples
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Thu Apr 04 07:21:38 UTC 2024 - 9.4K 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) -
utils/tests/utils.go
if reflect.ValueOf(got).Len() == reflect.ValueOf(expect).Len() { for i := 0; i < reflect.ValueOf(got).Len(); i++ { name := fmt.Sprintf(reflect.ValueOf(got).Type().Name()+" #%v", i) t.Run(name, func(t *testing.T) { AssertEqual(t, reflect.ValueOf(got).Index(i).Interface(), reflect.ValueOf(expect).Index(i).Interface()) }) } } else { name := reflect.ValueOf(got).Type().Elem().Name()
Registered: Wed Jun 12 16:27:09 UTC 2024 - Last Modified: Fri Mar 10 09:21:56 UTC 2023 - 3.9K bytes - Viewed (0) -
src/reflect/benchmark_test.go
BytesArray Value SliceAny Value MapStringAny Value }{ Bool: ValueOf(new(bool)).Elem(), String: ValueOf(new(string)).Elem(), Bytes: ValueOf(new([]byte)).Elem(), NamedBytes: ValueOf(new(namedBytes)).Elem(), BytesArray: ValueOf(new([32]byte)).Elem(), SliceAny: ValueOf(new([]any)).Elem(), MapStringAny: ValueOf(new(map[string]any)).Elem(), } var sinkAll struct { RawBool bool
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sun Nov 19 17:09:03 UTC 2023 - 8.8K bytes - Viewed (0) -
src/reflect/set_test.go
// direct m := make(map[int]int) mv := ValueOf(m) mv.SetMapIndex(ValueOf(1), ValueOf(2)) x, ok := m[1] if x != 2 { t.Errorf("#1 after SetMapIndex(1,2): %d, %t (map=%v)", x, ok, m) } if n := mv.MapIndex(ValueOf(1)).Interface().(int); n != 2 { t.Errorf("#1 MapIndex(1) = %d", n) } } { // convert interface key m := make(map[any]int) mv := ValueOf(m) mv.SetMapIndex(ValueOf(1), ValueOf(2))
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Sep 07 13:56:11 UTC 2022 - 5.7K bytes - Viewed (0) -
src/reflect/iter_test.go
val Value check func(*testing.T, iter.Seq[Value]) }{ {"int", ValueOf(4), func(t *testing.T, s iter.Seq[Value]) { i := int64(0) for v := range s { if v.Int() != i { t.Fatalf("got %d, want %d", v.Int(), i) } i++ } if i != 4 { t.Fatalf("should loop four times") } }}, {"int8", ValueOf(int8(4)), func(t *testing.T, s iter.Seq[Value]) { i := int8(0)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 10 14:27:54 UTC 2024 - 6.4K bytes - Viewed (0) -
src/runtime/race/testdata/reflect_test.go
ch := make(chan bool, 1) i := 0 v := reflect.ValueOf(&i) go func() { v.Elem().Set(reflect.ValueOf(1)) ch <- true }() _ = v.Elem().Int() <-ch } func TestRaceReflectWW(t *testing.T) { ch := make(chan bool, 1) i := 0 v := reflect.ValueOf(&i) go func() { v.Elem().Set(reflect.ValueOf(1)) ch <- true }() v.Elem().Set(reflect.ValueOf(2)) <-ch }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Aug 23 13:12:15 UTC 2016 - 811 bytes - Viewed (0) -
src/reflect/iter.go
v = v.Elem() for i := range v.Len() { if !yield(ValueOf(i)) { return } } } case Array, Slice: return func(yield func(Value) bool) { for i := range v.Len() { if !yield(ValueOf(i)) { return } } } case String: return func(yield func(Value) bool) { for i := range v.String() { if !yield(ValueOf(i)) { return } } } case Map:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 13:40:11 UTC 2024 - 3.9K bytes - Viewed (0) -
src/cmd/cgo/internal/testsanitizers/testdata/msan5.go
} } */ import "C" import ( "reflect" "unsafe" ) //export Go1 func Go1(p *C.int) { reflect.ValueOf(p).Elem().Set(reflect.ValueOf(C.int(42))) } //export Go2 func Go2(p *C.char) { a := (*[2]byte)(unsafe.Pointer(p)) reflect.Copy(reflect.ValueOf(a[:1]), reflect.ValueOf(a[1:])) } func main() { C.C1() C.C2()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 12 11:59:56 UTC 2023 - 904 bytes - Viewed (0) -
test/fixedbugs/issue48357.go
// license that can be found in the LICENSE file. package main import "reflect" type T [129]byte func main() { m := map[string]T{} v := reflect.ValueOf(m) v.SetMapIndex(reflect.ValueOf("a"), reflect.ValueOf(T{})) g = m["a"] }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Sep 13 18:38:15 UTC 2021 - 360 bytes - Viewed (0)