aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Runxi Yu2026-02-21 00:23:57 +0800
committerGravatar Runxi Yu2026-02-21 00:23:57 +0800
commit74b7854daa573894c8e725717567915bf55b22a0 (patch)
tree495344dd93feec2c74fdd04ae9fb0a314831dc3a
parentobjectid: Add SupportedAlgorithms (diff)
signatureNo signature
testgit: Use objectid's SupportedAlgorithms v0.1.10
-rw-r--r--internal/testgit/algorithms.go10
1 files changed, 1 insertions, 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)
})