diff options
| author | 2026-02-21 00:23:57 +0800 | |
|---|---|---|
| committer | 2026-02-21 00:23:57 +0800 | |
| commit | 74b7854daa573894c8e725717567915bf55b22a0 (patch) | |
| tree | 495344dd93feec2c74fdd04ae9fb0a314831dc3a /internal/testgit/algorithms.go | |
| parent | objectid: Add SupportedAlgorithms (diff) | |
| signature | No signature | |
testgit: Use objectid's SupportedAlgorithms v0.1.10
Diffstat (limited to 'internal/testgit/algorithms.go')
| -rw-r--r-- | internal/testgit/algorithms.go | 10 |
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) }) |
