Codebase list golang-github-ulikunitz-xz / fresh-releases/main none-check_test.go
fresh-releases/main

Tree @fresh-releases/main (Download .tar.gz)

none-check_test.go @fresh-releases/mainraw · history · blame

// Copyright 2014-2022 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)
	}

}