Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 108 for new2 (0.15 sec)

  1. staging/src/k8s.io/apimachinery/pkg/runtime/extension_test.go

    			t.Errorf("2nd unmarshal error: %v", err)
    		}
    		if !bytes.Equal(data, newData) {
    			t.Errorf("%s: re-marshaled data differs from original: %v %v", k, data, newData)
    		}
    		if !reflect.DeepEqual(tc.orig, new1) {
    			t.Errorf("%s: unmarshaled struct differs from original: %v %v", k, tc.orig, new1)
    		}
    		if !reflect.DeepEqual(new1, new2) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Aug 08 22:36:37 UTC 2017
    - 2.8K bytes
    - Viewed (0)
  2. test/typeparam/issue50598.dir/a0.go

    // license that can be found in the LICENSE file.
    
    package a0
    
    type Builder[T any] struct{}
    
    func (r Builder[T]) New1() T {
    	var v T
    	return v
    }
    
    func (r Builder[T]) New2() T {
    	var v T
    	return v
    }
    
    type IntBuilder struct{}
    
    func (b IntBuilder) New() int {
    	return Builder[int]{}.New2()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jan 14 16:41:18 UTC 2022
    - 398 bytes
    - Viewed (0)
  3. tests/named_argument_test.go

    	if err := DB.Exec("UPDATE named_users SET name1 = @name, name2 = @name2, name3 = @name", sql.Named("name", "jinzhu-new"), sql.Named("name2", "jinzhu-new2")).Error; err != nil {
    		t.Errorf("failed to update with named arg")
    	}
    
    	namedUser.Name1 = "jinzhu-new"
    	namedUser.Name2 = "jinzhu-new2"
    	namedUser.Name3 = "jinzhu-new"
    
    	var result5 NamedUser
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Tue Dec 21 11:50:00 UTC 2021
    - 2.7K bytes
    - Viewed (0)
  4. tests/update_belongs_to_test.go

    		t.Fatalf("errors happened when update: %v", err)
    	}
    
    	var user4 User
    	DB.Preload("Company").Preload("Manager").Find(&user4, "id = ?", user.ID)
    	CheckUser(t, user4, user)
    
    	user.Company.Name += "new2"
    	user.Manager.Name += "new2"
    	if err := DB.Session(&gorm.Session{FullSaveAssociations: true}).Select("`Company`").Save(&user).Error; err != nil {
    		t.Fatalf("errors happened when update: %v", err)
    	}
    
    	var user5 User
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Thu Jul 14 06:55:54 UTC 2022
    - 1.6K bytes
    - Viewed (0)
  5. test/typeparam/issue50552.dir/a.go

    package a
    
    type Builder[T any] struct{}
    
    func (r Builder[T]) New() T {
    	var v T
    	return v
    }
    
    func (r Builder[T]) New2() T {
    	return r.New()
    }
    
    func BuildInt() int {
    	return Builder[int]{}.New()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jan 11 21:51:51 UTC 2022
    - 196 bytes
    - Viewed (0)
  6. src/runtime/gc_test.go

    //
    //go:noinline
    func moveStackCheck(t *testing.T, new *int, old uintptr) bool {
    	// new should have been updated by the stack move;
    	// old should not have.
    
    	// Capture new's value before doing anything that could
    	// further move the stack.
    	new2 := uintptr(unsafe.Pointer(new))
    
    	t.Logf("old stack pointer %x, new stack pointer %x", old, new2)
    	if new2 == old {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jun 05 22:33:52 UTC 2024
    - 17.6K bytes
    - Viewed (0)
  7. tests/hooks_test.go

    	DB.Model(&product).Updates(map[string]interface{}{"Name": "Product New"})
    
    	if product.Name != "Product New" || product.Price != 160 || product.Code != "L1212" {
    		t.Errorf("invalid data after update, got %+v", product)
    	}
    
    	// Code changed, but not selected, price should not change
    	DB.Model(&product).Select("Name", "Price").Updates(map[string]interface{}{"Name": "Product New2", "code": "L1213"})
    
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Sat Feb 18 01:20:29 UTC 2023
    - 15.9K bytes
    - Viewed (0)
  8. src/internal/types/testdata/check/builtins0.go

    		_ byte = min(1, 'a')
    	)
    }
    
    func new1() {
    	_ = new() // ERROR "not enough arguments"
    	_ = new(1, 2) // ERROR "too many arguments"
    	_ = new("foo" /* ERROR "not a type" */)
    	p := new(float64)
    	_ = new(struct{ x, y int })
    	q := new(*float64)
    	_ = *p == **q
    	new /* ERROR "not used" */ (int)
            _ = &new /* ERROR "cannot take address" */ (int)
    
    	_ = new(int... /* ERROR "invalid use of ..." */ )
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 29.3K bytes
    - Viewed (0)
  9. src/runtime/iface.go

    	newN := n * 2                         // make it at most 50% full
    	newN = 1 << sys.Len64(uint64(newN-1)) // round up to a power of 2
    
    	// Allocate the new table.
    	newSize := unsafe.Sizeof(abi.TypeAssertCache{}) + uintptr(newN-1)*unsafe.Sizeof(abi.TypeAssertCacheEntry{})
    	newC := (*abi.TypeAssertCache)(mallocgc(newSize, nil, true))
    	newC.Mask = uintptr(newN - 1)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 22.5K bytes
    - Viewed (0)
  10. src/runtime/proc.go

    	checkdead()
    	unlock(&sched.lock)
    
    	for {
    		lock(&newmHandoff.lock)
    		for newmHandoff.newm != 0 {
    			newm := newmHandoff.newm.ptr()
    			newmHandoff.newm = 0
    			unlock(&newmHandoff.lock)
    			for newm != nil {
    				next := newm.schedlink.ptr()
    				newm.schedlink = 0
    				newm1(newm)
    				newm = next
    			}
    			lock(&newmHandoff.lock)
    		}
    		newmHandoff.waiting = true
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 207.5K bytes
    - Viewed (0)
Back to top