From 74b7854daa573894c8e725717567915bf55b22a0 Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Sat, 21 Feb 2026 00:23:57 +0800 Subject: testgit: Use objectid's SupportedAlgorithms --- internal/testgit/algorithms.go | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/internal/testgit/algorithms.go b/internal/testgit/algorithms.go index 6d7a7565..81af4f75 100644 --- a/internal/testgit/algorithms.go +++ b/internal/testgit/algorithms.go @@ -6,18 +6,10 @@ import ( "codeberg.org/lindenii/furgit/objectid" ) -// SupportedAlgorithms returns all object ID algorithms supported by furgit. -func SupportedAlgorithms() []objectid.Algorithm { - return []objectid.Algorithm{ - objectid.AlgorithmSHA1, - objectid.AlgorithmSHA256, - } -} - // ForEachAlgorithm runs a subtest for every supported algorithm. func ForEachAlgorithm(t *testing.T, fn func(t *testing.T, algo objectid.Algorithm)) { t.Helper() - for _, algo := range SupportedAlgorithms() { + for _, algo := range objectid.SupportedAlgorithms() { t.Run(algo.String(), func(t *testing.T) { fn(t, algo) }) -- cgit v1.3.1-10-gc9f91