MCPcopy Create free account
hub / github.com/libgit2/git2go / TestTreeEntryById

Function TestTreeEntryById

tree_test.go:8–26  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

6)
7
8func TestTreeEntryById(t *testing.T) {
9 t.Parallel()
10 repo := createTestRepo(t)
11 defer cleanupTestRepo(t, repo)
12
13 _, treeID := seedTestRepo(t, repo)
14
15 tree, err := repo.LookupTree(treeID)
16 checkFatal(t, err)
17
18 id, err := NewOid("257cc5642cb1a054f08cc83f2d943e56fd3ebe99")
19 checkFatal(t, err)
20
21 entry := tree.EntryById(id)
22
23 if entry == nil {
24 t.Fatalf("entry id %v was not found", id)
25 }
26}
27
28func TestTreeBuilderInsert(t *testing.T) {
29 t.Parallel()

Callers

nothing calls this directly

Calls 7

createTestRepoFunction · 0.85
cleanupTestRepoFunction · 0.85
seedTestRepoFunction · 0.85
checkFatalFunction · 0.85
NewOidFunction · 0.85
LookupTreeMethod · 0.80
EntryByIdMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…