Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 31 for setstruct (0.14 sec)

  1. 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)
  2. 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)
  3. 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)
  4. staging/src/k8s.io/apiserver/pkg/cel/value_test.go

    		t.Errorf("got %v, wanted {'Test': 12u, 'Check': 34u}", mpStrUint)
    	}
    	tstStr, err := mv.ConvertToNative(reflect.TypeOf(&tstStruct{}))
    	if err != nil {
    		t.Fatal(err)
    	}
    	if !reflect.DeepEqual(tstStr, &tstStruct{
    		Test:  uint64(12),
    		Check: uint64(34),
    	}) {
    		t.Errorf("got %v, wanted tstStruct{Test: 12u, Check: 34u}", tstStr)
    	}
    }
    
    func TestMapValueEqual(t *testing.T) {
    	mv := NewMapValue()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Oct 10 22:05:55 UTC 2022
    - 10.4K bytes
    - Viewed (0)
  5. pkg/wasm/convert_test.go

    func messageToStruct(t *testing.T, m proto.Message) *structpb.Struct {
    	st, err := conversion.MessageToStruct(m)
    	if err != nil {
    		t.Fatal(err)
    	}
    	return st
    }
    
    func newStruct(t *testing.T, m map[string]any) *structpb.Struct {
    	st, err := structpb.NewStruct(m)
    	if err != nil {
    		t.Fatal(err)
    	}
    	return st
    }
    
    func messageToAnyWithTypeURL(t *testing.T, msg proto.Message, typeURL string) *anypb.Any {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Apr 17 20:06:41 UTC 2024
    - 13.6K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/walk/compare.go

    			expr = cond
    		} else {
    			expr = ir.NewLogicalExpr(base.Pos, andor, expr, cond)
    		}
    	}
    	cmpl = safeExpr(cmpl, init)
    	cmpr = safeExpr(cmpr, init)
    	if t.IsStruct() {
    		conds, _ := compare.EqStruct(t, cmpl, cmpr)
    		if n.Op() == ir.OEQ {
    			for _, cond := range conds {
    				and(cond)
    			}
    		} else {
    			for _, cond := range conds {
    				notCond := ir.NewUnaryExpr(base.Pos, ir.ONOT, cond)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 24 21:55:14 UTC 2023
    - 16.2K bytes
    - Viewed (0)
  7. src/go/types/issues_test.go

    	T1 := NewNamed(n1, nil, nil)
    	n2 := NewTypeName(nopos, nil, "T2", nil)
    	T2 := NewNamed(n2, nil, nil)
    	s1 := NewStruct([]*Var{NewField(nopos, nil, "_", T2, false)}, nil)
    	T1.SetUnderlying(s1)
    	s2 := NewStruct([]*Var{NewField(nopos, nil, "_", T2, false)}, nil)
    	s3 := NewStruct([]*Var{NewField(nopos, nil, "_", s2, false)}, nil)
    	T2.SetUnderlying(s3)
    
    	// These calls must terminate (no endless recursion).
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 28.1K bytes
    - Viewed (0)
  8. src/main/java/org/codelibs/fess/es/user/bsbhv/BsUserBhv.java

                result.setRoomNumber(DfTypeUtil.toString(source.get("roomNumber")));
                result.setState(DfTypeUtil.toString(source.get("state")));
                result.setStreet(DfTypeUtil.toString(source.get("street")));
                result.setSurname(DfTypeUtil.toString(source.get("surname")));
                result.setTelephoneNumber(DfTypeUtil.toString(source.get("telephoneNumber")));
    Registered: Wed Jun 12 13:08:18 UTC 2024
    - Last Modified: Thu Feb 22 01:37:57 UTC 2024
    - 12K bytes
    - Viewed (0)
  9. src/cmd/vet/testdata/print/print.go

    	stringStruct := struct{ F string }{"foo"}
    	fmt.Printf("%s", &stringStruct) // not an error
    
    	intStruct := struct{ F int }{3}
    	fmt.Printf("%s", &intStruct) // ERROR "Printf format %s has arg &intStruct of wrong type \*struct{F int}"
    
    	stringMap := map[string]string{"foo": "bar"}
    	fmt.Printf("%s", &stringMap) // not an error
    
    	intMap := map[int]int{3: 4}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 09 01:28:01 UTC 2023
    - 27.5K bytes
    - Viewed (0)
  10. src/main/java/org/codelibs/fess/es/user/bsentity/BsUser.java

            this.state = value;
        }
    
        public String getStreet() {
            checkSpecifiedProperty("street");
            return convertEmptyToNull(street);
        }
    
        public void setStreet(String value) {
            registerModifiedProperty("street");
            this.street = value;
        }
    
        public String getSurname() {
            checkSpecifiedProperty("surname");
    Registered: Wed Jun 12 13:08:18 UTC 2024
    - Last Modified: Thu Feb 22 01:37:57 UTC 2024
    - 22.8K bytes
    - Viewed (0)
Back to top