Codebase list golang-github-ulikunitz-xz / 31dfa3ed-9a2b-405f-a04a-28d2523f0650/upstream none-check_test.go
31dfa3ed-9a2b-405f-a04a-28d2523f0650/upstream

Tree @31dfa3ed-9a2b-405f-a04a-28d2523f0650/upstream (Download .tar.gz)

none-check_test.go @31dfa3ed-9a2b-405f-a04a-28d2523f0650/upstreamraw · history · blame

// Copyright 2014-2021 Ulrich Kunitz. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package xz

import (
	"bytes"
	"testing"
)

func TestNoneHash(t *testing.T) {
	h := newNoneHash()

	p := []byte("foo")
	q := h.Sum(p)

	if !bytes.Equal(q, p) {
		t.Fatalf("h.Sum: got %q; want %q", q, p)
	}

}