From 189aa75333453434fc4b2f1f71dcce89cfba1fcb Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Fri, 15 May 2026 17:51:47 +0000 Subject: obejct/id: Remove pack/signature/etc-specific object ID properties These properties should belong to their relevant package rather than getting stuffed into object/id. --- object/id/algorithm_test.go | 42 ------------------------------------------ 1 file changed, 42 deletions(-) (limited to 'object/id/algorithm_test.go') diff --git a/object/id/algorithm_test.go b/object/id/algorithm_test.go index 15f61ecb..a596236a 100644 --- a/object/id/algorithm_test.go +++ b/object/id/algorithm_test.go @@ -6,39 +6,6 @@ import ( "codeberg.org/lindenii/furgit/object/id" ) -func TestAlgorithmEmptyTree(t *testing.T) { - t.Parallel() - - tests := []struct { - name string - algo id.Algorithm - want string - }{ - { - name: "sha1", - algo: id.AlgorithmSHA1, - want: "4b825dc642cb6eb9a060e54bf8d69288fbee4904", - }, - { - name: "sha256", - algo: id.AlgorithmSHA256, - want: "6ef19b41225c5369f1c104d45d8d85efa9b057b53b14b4b9b939dd74decc5321", - }, - } - - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - t.Parallel() - - got := tt.algo.EmptyTree() - - if got.String() != tt.want { - t.Fatalf("EmptyTree() = %q, want %q", got.String(), tt.want) - } - }) - } -} - func TestParseAlgorithm(t *testing.T) { t.Parallel() @@ -74,12 +41,3 @@ func TestAlgorithmSum(t *testing.T) { t.Fatalf("sha1 and sha256 should differ") } } - -func TestUnknownAlgorithmEmptyTree(t *testing.T) { - t.Parallel() - - got := id.AlgorithmUnknown.EmptyTree() - if got != (id.ObjectID{}) { - t.Fatalf("EmptyTree() for unknown algorithm = %#v, want zero value", got) - } -} -- cgit v1.3.1-10-gc9f91