Codebase list golang-github-ulikunitz-xz / 78fc8609-f4de-49e2-a8a9-57652e28e447/main none-check_test.go
78fc8609-f4de-49e2-a8a9-57652e28e447/main

Tree @78fc8609-f4de-49e2-a8a9-57652e28e447/main (Download .tar.gz)

none-check_test.go @78fc8609-f4de-49e2-a8a9-57652e28e447/mainraw · 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)
	}

}