From f54d59ce6c106d445e1ada199471ac56b7fc80bc Mon Sep 17 00:00:00 2001 From: Ali Date: Thu, 22 Dec 2022 17:44:25 +0500 Subject: [PATCH] all tests passed --- github/github-accessors.go | 56 -------------------------- github/github-accessors_test.go | 70 --------------------------------- 2 files changed, 126 deletions(-) diff --git a/github/github-accessors.go b/github/github-accessors.go index f93c1a2c1f2..d823d630ad7 100644 --- a/github/github-accessors.go +++ b/github/github-accessors.go @@ -94,46 +94,6 @@ func (a *ActionsCache) GetVersion() string { return *a.Version } -// GetTotalCount returns the TotalCount field if it's non-nil, zero value otherwise. -func (a *ActionsCacheList) GetTotalCount() int64 { - if a == nil || a.TotalCount == nil { - return 0 - } - return *a.TotalCount -} - -// GetActiveCachesCount returns the ActiveCachesCount field if it's non-nil, zero value otherwise. -func (a *ActionsCacheUsage) GetActiveCachesCount() int64 { - if a == nil || a.ActiveCachesCount == nil { - return 0 - } - return *a.ActiveCachesCount -} - -// GetActiveCacheUsageSize returns the ActiveCacheUsageSize field if it's non-nil, zero value otherwise. -func (a *ActionsCacheUsage) GetActiveCacheUsageSize() int64 { - if a == nil || a.ActiveCacheUsageSize == nil { - return 0 - } - return *a.ActiveCacheUsageSize -} - -// GetFullName returns the FullName field if it's non-nil, zero value otherwise. -func (a *ActionsCacheUsage) GetFullName() string { - if a == nil || a.FullName == nil { - return "" - } - return *a.FullName -} - -// GetTotalCount returns the TotalCount field if it's non-nil, zero value otherwise. -func (a *ActionsCacheUsageList) GetTotalCount() int64 { - if a == nil || a.TotalCount == nil { - return 0 - } - return *a.TotalCount -} - // GetAllowedActions returns the AllowedActions field if it's non-nil, zero value otherwise. func (a *ActionsPermissions) GetAllowedActions() string { if a == nil || a.AllowedActions == nil { @@ -19390,22 +19350,6 @@ func (t *TopicsSearchResult) GetTotal() int { return *t.Total } -// GetTotalActiveCachesCount returns the TotalActiveCachesCount field if it's non-nil, zero value otherwise. -func (t *TotalCacheUsage) GetTotalActiveCachesCount() int64 { - if t == nil || t.TotalActiveCachesCount == nil { - return 0 - } - return *t.TotalActiveCachesCount -} - -// GetTotalActiveCacheUsageSize returns the TotalActiveCacheUsageSize field if it's non-nil, zero value otherwise. -func (t *TotalCacheUsage) GetTotalActiveCacheUsageSize() int64 { - if t == nil || t.TotalActiveCacheUsageSize == nil { - return 0 - } - return *t.TotalActiveCacheUsageSize -} - // GetCount returns the Count field if it's non-nil, zero value otherwise. func (t *TrafficClones) GetCount() int { if t == nil || t.Count == nil { diff --git a/github/github-accessors_test.go b/github/github-accessors_test.go index 095a030fa4f..a279fb2b25e 100644 --- a/github/github-accessors_test.go +++ b/github/github-accessors_test.go @@ -115,56 +115,6 @@ func TestActionsCache_GetVersion(tt *testing.T) { a.GetVersion() } -func TestActionsCacheList_GetTotalCount(tt *testing.T) { - var zeroValue int64 - a := &ActionsCacheList{TotalCount: &zeroValue} - a.GetTotalCount() - a = &ActionsCacheList{} - a.GetTotalCount() - a = nil - a.GetTotalCount() -} - -func TestActionsCacheUsage_GetActiveCachesCount(tt *testing.T) { - var zeroValue int64 - a := &ActionsCacheUsage{ActiveCachesCount: &zeroValue} - a.GetActiveCachesCount() - a = &ActionsCacheUsage{} - a.GetActiveCachesCount() - a = nil - a.GetActiveCachesCount() -} - -func TestActionsCacheUsage_GetActiveCacheUsageSize(tt *testing.T) { - var zeroValue int64 - a := &ActionsCacheUsage{ActiveCacheUsageSize: &zeroValue} - a.GetActiveCacheUsageSize() - a = &ActionsCacheUsage{} - a.GetActiveCacheUsageSize() - a = nil - a.GetActiveCacheUsageSize() -} - -func TestActionsCacheUsage_GetFullName(tt *testing.T) { - var zeroValue string - a := &ActionsCacheUsage{FullName: &zeroValue} - a.GetFullName() - a = &ActionsCacheUsage{} - a.GetFullName() - a = nil - a.GetFullName() -} - -func TestActionsCacheUsageList_GetTotalCount(tt *testing.T) { - var zeroValue int64 - a := &ActionsCacheUsageList{TotalCount: &zeroValue} - a.GetTotalCount() - a = &ActionsCacheUsageList{} - a.GetTotalCount() - a = nil - a.GetTotalCount() -} - func TestActionsPermissions_GetAllowedActions(tt *testing.T) { var zeroValue string a := &ActionsPermissions{AllowedActions: &zeroValue} @@ -22594,26 +22544,6 @@ func TestTopicsSearchResult_GetTotal(tt *testing.T) { t.GetTotal() } -func TestTotalCacheUsage_GetTotalActiveCachesCount(tt *testing.T) { - var zeroValue int64 - t := &TotalCacheUsage{TotalActiveCachesCount: &zeroValue} - t.GetTotalActiveCachesCount() - t = &TotalCacheUsage{} - t.GetTotalActiveCachesCount() - t = nil - t.GetTotalActiveCachesCount() -} - -func TestTotalCacheUsage_GetTotalActiveCacheUsageSize(tt *testing.T) { - var zeroValue int64 - t := &TotalCacheUsage{TotalActiveCacheUsageSize: &zeroValue} - t.GetTotalActiveCacheUsageSize() - t = &TotalCacheUsage{} - t.GetTotalActiveCacheUsageSize() - t = nil - t.GetTotalActiveCacheUsageSize() -} - func TestTrafficClones_GetCount(tt *testing.T) { var zeroValue int t := &TrafficClones{Count: &zeroValue}