- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 61 for setstruct (0.19 sec)
-
src/cmd/cgo/internal/test/test.go
*x = 1; } void setintptr(intptr x) { *x = 1; } void setvoidptr(void *x) { *(int*)x = 1; } typedef struct Struct Struct; struct Struct { int *P; }; void setstruct(Struct s) { *s.P = 1; } // issue 11925 // Structs with zero-length trailing fields are now padded by the Go compiler. struct a11925 { int i; char a[0]; char b[0]; };
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 20 15:50:06 UTC 2024 - 48.5K bytes - Viewed (0) -
src/encoding/asn1/marshal_test.go
type marshalWithParamsTest struct { in any params string out string // hex encoded } var marshalWithParamsTests = []marshalWithParamsTest{ {intStruct{10}, "set", "310302010a"}, {intStruct{10}, "application", "600302010a"}, {intStruct{10}, "private", "e00302010a"}, } func TestMarshalWithParams(t *testing.T) { for i, test := range marshalWithParamsTests {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Dec 13 18:45:54 UTC 2021 - 10K bytes - Viewed (0) -
pkg/typemap/map_test.go
typemap.Set[TestInterface[string]](tm, TestStruct{Field: "interface"}) assert.Equal(t, typemap.Get[int](tm), ptr.Of(1)) assert.Equal(t, typemap.Get[int32](tm), ptr.Of(int32(2))) assert.Equal(t, typemap.Get[string](tm), ptr.Of("string")) assert.Equal(t, typemap.Get[*TestStruct](tm), ptr.Of(&TestStruct{Field: "pointer"})) assert.Equal(t, typemap.Get[TestInterface[string]](tm), ptr.Of(TestInterface[string](TestStruct{Field: "interface"})))
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Wed Apr 17 16:38:40 UTC 2024 - 1.5K bytes - Viewed (0) -
src/cmd/compile/internal/types/type.go
if fieldsHasShape(allParams) { t.SetHasShape(true) } return t } // NewStruct returns a new struct with the given fields. func NewStruct(fields []*Field) *Type { t := newType(TSTRUCT) t.setFields(fields) if fieldsHasShape(fields) { t.SetHasShape(true) } for _, f := range fields { if f.Type.NotInHeap() { t.SetNotInHeap(true) break } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Apr 04 14:29:45 UTC 2024 - 49.5K bytes - Viewed (0) -
staging/src/k8s.io/cli-runtime/pkg/printers/json_test.go
"k8s.io/apimachinery/pkg/util/json" "k8s.io/client-go/kubernetes/scheme" ) var testData = TestStruct{ TypeMeta: metav1.TypeMeta{APIVersion: "foo/bar", Kind: "TestStruct"}, Key: "testValue", Map: map[string]int{"TestSubkey": 1}, StringList: []string{"a", "b", "c"}, IntList: []int{1, 2, 3}, } type TestStruct struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"`
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Apr 12 15:46:12 UTC 2023 - 4K bytes - Viewed (0) -
pkg/config/model_test.go
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Fri Apr 12 17:37:32 UTC 2024 - 7.9K bytes - Viewed (0) -
src/unique/handle_test.go
testHandle[testStringStruct](t, testStringStruct{"x"}) testHandle[testStringStructArrayStruct](t, testStringStructArrayStruct{ s: [2]testStringStruct{testStringStruct{"y"}, testStringStruct{"z"}}, }) testHandle[testStruct](t, testStruct{0.5, "184"}) } func testHandle[T comparable](t *testing.T, value T) { name := reflect.TypeFor[T]().Name() t.Run(fmt.Sprintf("%s/%#v", name, value), func(t *testing.T) { t.Parallel()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Apr 22 18:14:07 UTC 2024 - 2.5K bytes - Viewed (0) -
operator/pkg/util/reflect_test.go
} } func TestIsValueFuncs(t *testing.T) { testInt := int(42) testStruct := struct{}{} testSlice := []bool{} testMap := map[bool]bool{} var testNilSlice []bool var testNilMap map[bool]bool allValues := []any{nil, testInt, &testInt, testStruct, &testStruct, testNilSlice, testSlice, &testSlice, testNilMap, testMap, &testMap} tests := []struct { desc string
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Mon Jul 25 19:30:47 UTC 2022 - 10.2K bytes - Viewed (0) -
test/typeparam/issue47716.go
return unsafe.Sizeof(x) } // size returns the alignment of type T func align[T any](x T) uintptr { return unsafe.Alignof(x) } type Tstruct[T any] struct { f1 T f2 int } // offset returns the offset of field f2 in the generic type Tstruct func (r *Tstruct[T]) offset() uintptr { return unsafe.Offsetof(r.f2) } func main() { v1 := int(5) if got, want := size(v1), unsafe.Sizeof(v1); got != want {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Mar 01 19:45:34 UTC 2022 - 1.6K bytes - Viewed (0) -
analysis/analysis-api-fir/src/org/jetbrains/kotlin/analysis/api/fir/symbols/KtFirDestructuringDeclarationSymbol.kt
override val analysisSession: KaFirSession, ) : KaDestructuringDeclarationSymbol(), KaFirSymbol<FirVariableSymbol<*>> { init { require(firSymbol.name == SpecialNames.DESTRUCT) } override val psi: KtDestructuringDeclaration get() = withValidityAssertion { when (val psi = firSymbol.fir.psi) { is KtDestructuringDeclaration -> psi
Registered: Wed Jun 12 09:53:16 UTC 2024 - Last Modified: Tue Jun 11 15:45:42 UTC 2024 - 3.3K bytes - Viewed (0)