diff options
author | CaiCandong <50507092+CaiCandong@users.noreply.github.com> | 2023-09-07 17:37:47 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-07 09:37:47 +0000 |
commit | a78c2eae243077c1fed5f7b056c64072d3c63ac8 (patch) | |
tree | 53b63a8dafde117e76f5fede968e384ae55779b1 /modules/indexer/issues/internal/tests/tests.go | |
parent | e97e883ad50774f249c8c694598c25a17227299b (diff) | |
download | gitea-a78c2eae243077c1fed5f7b056c64072d3c63ac8.tar.gz gitea-a78c2eae243077c1fed5f7b056c64072d3c63ac8.zip |
Replace `util.SliceXxx` with `slices.Xxx` (#26958)
Diffstat (limited to 'modules/indexer/issues/internal/tests/tests.go')
-rw-r--r-- | modules/indexer/issues/internal/tests/tests.go | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/modules/indexer/issues/internal/tests/tests.go b/modules/indexer/issues/internal/tests/tests.go index 93d38a0b37..06fddeb65b 100644 --- a/modules/indexer/issues/internal/tests/tests.go +++ b/modules/indexer/issues/internal/tests/tests.go @@ -10,6 +10,7 @@ package tests import ( "context" "fmt" + "slices" "testing" "time" @@ -457,7 +458,7 @@ var cases = []*testIndexerCase{ assert.Contains(t, data[v.ID].MentionIDs, int64(1)) } assert.Equal(t, countIndexerData(data, func(v *internal.IndexerData) bool { - return util.SliceContains(v.MentionIDs, 1) + return slices.Contains(v.MentionIDs, 1) }), result.Total) }, }, @@ -478,7 +479,7 @@ var cases = []*testIndexerCase{ assert.Contains(t, data[v.ID].ReviewedIDs, int64(1)) } assert.Equal(t, countIndexerData(data, func(v *internal.IndexerData) bool { - return util.SliceContains(v.ReviewedIDs, 1) + return slices.Contains(v.ReviewedIDs, 1) }), result.Total) }, }, @@ -499,7 +500,7 @@ var cases = []*testIndexerCase{ assert.Contains(t, data[v.ID].ReviewRequestedIDs, int64(1)) } assert.Equal(t, countIndexerData(data, func(v *internal.IndexerData) bool { - return util.SliceContains(v.ReviewRequestedIDs, 1) + return slices.Contains(v.ReviewRequestedIDs, 1) }), result.Total) }, }, @@ -520,7 +521,7 @@ var cases = []*testIndexerCase{ assert.Contains(t, data[v.ID].SubscriberIDs, int64(1)) } assert.Equal(t, countIndexerData(data, func(v *internal.IndexerData) bool { - return util.SliceContains(v.SubscriberIDs, 1) + return slices.Contains(v.SubscriberIDs, 1) }), result.Total) }, }, |