You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: digest_test.go
    path of file: ./repos/dep/gps/verify
    
    the code of the file until where you have to start completion: // Copyright 2017 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package verify

import (
	"bytes"
	"io"
	"os"
	"path/filepath"
	"testing"
)

// crossBuffer is a test io.Reader that emits a few canned responses.
type crossBuffer struct {
	readCount  int
	iterations []string
}

func (cb *crossBuffer) Read(buf []byte) (int, error) {
	if cb.readCount == len(cb.iterations) {
		return 0, io.EOF
	}
	cb.readCount++
	return copy(buf, cb.iterations[cb.readCount-1]), nil
}

func streamThruLineEndingReader(t *testing.T, iterations []string) []byte {
	dst := new(bytes.Buffer)
	n, err := io.Copy(dst, newLineEndingReader(&crossBuffer{iterations: iterations}))
	if got, want
    
func TestDigestFromDirectory(t *testing.T) {
	relativePathname := "launchpad.net/match"
	want := []byte{0x7e, 0x10, 0x6, 0x2f, 0x8, 0x3, 0x3c, 0x76, 0xae, 0xbc, 0xa4, 0xc9, 0xec, 0x73, 0x67, 0x15, 0x70, 0x2b, 0x0, 0x89, 0x27, 0xbb, 0x61, 0x9d, 0xc7, 0xc3, 0x39, 0x46, 0x3, 0x91, 0xb7, 0x3b}

	// NOTE: Create the hash using both an absolute and a relative pathname to
	// ensure hash ignores prefix.

	t.Run("AbsolutePrefix", func(t *testing.T) {
		t.Parallel()
		prefix := getTestdataVerifyRoot(t)
		got, err := DigestFromDirectory(filepath.Join(prefix, relativePathname))
		if err != nil {
			t.Fatal(err)
		}
		if !bytes.Equal(got.Digest, want) {
			t.Errorf("\n(GOT):\n\t%#v\n(WNT):\n\t%#v", got, want)
		}
	})

	t.Run("RelativePrefix", func(t *testing.T) {
		t.Parallel()
		prefix := "../_testdata/digest"
		got, err := DigestFromDirectory(filepath.Join(prefix, relativePathname))
		if err != nil {
			t.Fatal(err)
		}
		if !bytes.Equal(got.Digest, want) {
			t.Errorf("\n(GOT):\n\t%#v\n(WNT):\n\t%#v", got, want)
		}
	})
}