aboutsummaryrefslogtreecommitdiffstats
path: root/utils/merkletrie/noder/noder_test.go
diff options
context:
space:
mode:
authorPaul T <paul.t@gembaadvantage.com>2021-12-15 06:31:49 +0000
committerGitHub <noreply@github.com>2021-12-15 06:31:49 +0000
commit53a714bdc90026135e2f2ada1c4d6c925b2733cd (patch)
tree1fe7dc9f5974bc6e5a65e805b96e3a36be3f573e /utils/merkletrie/noder/noder_test.go
parentaba274ca7daf59d07d9559e6f99ca18ef0b78c7b (diff)
parentf0b111ab70e4e90013658b0835929b2083902017 (diff)
downloadgo-git-53a714bdc90026135e2f2ada1c4d6c925b2733cd.tar.gz
Merge branch 'go-git:master' into master
Diffstat (limited to 'utils/merkletrie/noder/noder_test.go')
-rw-r--r--utils/merkletrie/noder/noder_test.go15
1 files changed, 1 insertions, 14 deletions
diff --git a/utils/merkletrie/noder/noder_test.go b/utils/merkletrie/noder/noder_test.go
index 5e014fe..c1af998 100644
--- a/utils/merkletrie/noder/noder_test.go
+++ b/utils/merkletrie/noder/noder_test.go
@@ -25,6 +25,7 @@ func (n noderMock) Name() string { return n.name }
func (n noderMock) IsDir() bool { return n.isDir }
func (n noderMock) Children() ([]Noder, error) { return n.children, nil }
func (n noderMock) NumChildren() (int, error) { return len(n.children), nil }
+func (n noderMock) Skip() bool { return false }
// Returns a sequence with the noders 3, 2, and 1 from the
// following diagram:
@@ -57,20 +58,6 @@ func childrenFixture() []Noder {
return []Noder{c1, c2}
}
-// Returns the same as nodersFixture but sorted by name, this is: "1",
-// "2" and then "3".
-func sortedNodersFixture() []Noder {
- n1 := &noderMock{
- name: "1",
- hash: []byte{0x00, 0x01, 0x02},
- isDir: true,
- children: childrenFixture(),
- }
- n2 := &noderMock{name: "2"}
- n3 := &noderMock{name: "3"}
- return []Noder{n1, n2, n3} // the same as nodersFixture but sorted by name
-}
-
// returns nodersFixture as the path of "1".
func pathFixture() Path {
return Path(nodersFixture())