Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 15 for useT40 (0.2 sec)

  1. test/live2.go

    	printnl()     // ERROR "live at call to printnl: ret$"
    	useT40(t)
    }
    
    func good40() {
    	ret := T40{}                  // ERROR "stack object ret T40$"
    	ret.m = make(map[int]int, 42) // ERROR "stack object .autotmp_[0-9]+ runtime.hmap$"
    	t := &ret
    	printnl() // ERROR "live at call to printnl: ret$"
    	useT40(t)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Aug 21 23:29:33 UTC 2023
    - 953 bytes
    - Viewed (0)
  2. test/live.go

    }
    
    // issue 8142: lost 'addrtaken' bit on inlined variables.
    // no inlining in this test, so just checking that non-inlined works.
    
    type T40 struct {
    	m map[int]int
    }
    
    //go:noescape
    func useT40(*T40)
    
    func newT40() *T40 {
    	ret := T40{}
    	ret.m = make(map[int]int, 42) // ERROR "live at call to makemap: &ret$"
    	return &ret
    }
    
    func bad40() {
    	t := newT40()
    	_ = t
    	printnl()
    }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Dec 05 20:34:30 UTC 2023
    - 18K bytes
    - Viewed (0)
  3. test/live_regabi.go

    }
    
    // issue 8142: lost 'addrtaken' bit on inlined variables.
    // no inlining in this test, so just checking that non-inlined works.
    
    type T40 struct {
    	m map[int]int
    }
    
    //go:noescape
    func useT40(*T40)
    
    func newT40() *T40 {
    	ret := T40{}
    	ret.m = make(map[int]int, 42) // ERROR "live at call to makemap: &ret$"
    	return &ret
    }
    
    func bad40() {
    	t := newT40()
    	_ = t
    	printnl()
    }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Dec 05 20:34:30 UTC 2023
    - 18.4K bytes
    - Viewed (0)
  4. tests/update_has_many_test.go

    	if err := DB.Session(&gorm.Session{FullSaveAssociations: true}).Save(&user).Error; err != nil {
    		t.Fatalf("errors happened when update: %v", err)
    	}
    
    	var user4 User
    	DB.Preload("Pets").Find(&user4, "id = ?", user.ID)
    	CheckUser(t, user4, user)
    
    	t.Run("Polymorphic", func(t *testing.T) {
    		user := *GetUser("update-has-many", Config{})
    
    		if err := DB.Create(&user).Error; err != nil {
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Thu Jan 06 07:02:53 UTC 2022
    - 2K bytes
    - Viewed (0)
  5. tests/upsert_test.go

    	}
    
    	DB.Where(&User{Name: "find or init"}).Attrs(User{Age: 44}).FirstOrInit(&user4)
    	if user4.Name != "find or init" || user4.ID != 0 || user4.Age != 44 {
    		t.Errorf("user should be initialized with search value and attrs")
    	}
    
    	DB.Where(&User{Name: "find or init"}).Assign("age", 44).FirstOrInit(&user4)
    	if user4.Name != "find or init" || user4.ID != 0 || user4.Age != 44 {
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Mon Sep 05 07:39:19 UTC 2022
    - 11.4K bytes
    - Viewed (0)
  6. tests/update_has_one_test.go

    	}
    
    	var user4 User
    	DB.Preload("Account").Find(&user4, "id = ?", user.ID)
    
    	if lastUpdatedAt.Format(time.RFC3339) == user4.Account.UpdatedAt.Format(time.RFC3339) {
    		t.Fatalf("updated at should be updated, but not, old: %v, new %v", lastUpdatedAt.Format(time.RFC3339), user3.Account.UpdatedAt.Format(time.RFC3339))
    	} else {
    		user.Account.UpdatedAt = user4.Account.UpdatedAt
    		CheckUser(t, user4, user)
    	}
    
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Thu Jul 14 06:55:54 UTC 2022
    - 3.6K bytes
    - Viewed (0)
  7. tests/update_many2many_test.go

    	if err := DB.Session(&gorm.Session{FullSaveAssociations: true}).Save(&user).Error; err != nil {
    		t.Fatalf("errors happened when update: %v", err)
    	}
    
    	var user4 User
    	DB.Preload("Languages").Preload("Friends").Find(&user4, "id = ?", user.ID)
    	CheckUser(t, user4, user)
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Thu Jan 06 07:02:53 UTC 2022
    - 1.3K bytes
    - Viewed (0)
  8. tests/update_belongs_to_test.go

    	if err := DB.Session(&gorm.Session{FullSaveAssociations: true}).Save(&user).Error; err != nil {
    		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"
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Thu Jul 14 06:55:54 UTC 2022
    - 1.6K bytes
    - Viewed (0)
  9. tests/preload_test.go

    	})
    
    	for i, u := range users3 {
    		CheckUser(t, u, users[i])
    	}
    
    	var user4 User
    	DB.Delete(&users3[0].Account)
    
    	if err := DB.Preload(clause.Associations).Take(&user4, "id = ?", users3[0].ID).Error; err != nil || user4.Account.ID != 0 {
    		t.Errorf("failed to query, got error %v, account: %#v", err, user4.Account)
    	}
    
    	if err := DB.Preload(clause.Associations, func(tx *gorm.DB) *gorm.DB {
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Wed Jun 12 10:00:47 UTC 2024
    - 15.9K bytes
    - Viewed (0)
  10. src/cmd/go/internal/auth/netrc_test.go

    machine test.host
    login user2
    password pwd2
    
    machine oneline login user3 password pwd3
    
    machine ignore.host macdef ignore
      login nobody
      password nothing
    
    machine hasmacro.too macdef ignore-next-lines login user4 password pwd4
      login nobody
      password nothing
    
    default
    login anonymous
    password ******@****.***
    
    machine after.default
    login oops
    password too-late-in-file
    `
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 23 21:11:28 UTC 2019
    - 1K bytes
    - Viewed (0)
Back to top