Fast implementation of Git in pure Go
1package testgit
2
3import (
4 "testing"
5
6 "codeberg.org/lindenii/furgit/objectid"
7)
8
9// ForEachAlgorithm runs a subtest for every supported algorithm.
10func ForEachAlgorithm(t *testing.T, fn func(t *testing.T, algo objectid.Algorithm)) {
11 t.Helper()
12
13 for _, algo := range objectid.SupportedAlgorithms() {
14 t.Run(algo.String(), func(t *testing.T) {
15 fn(t, algo)
16 })
17 }
18}