1// Copyright 2014-2019 Ulrich Kunitz. All rights reserved. 2// Use of this source code is governed by a BSD-style 3// license that can be found in the LICENSE file. 4 5package xz 6 7import ( 8 "bytes" 9 "testing" 10) 11 12func TestNoneHash(t *testing.T) { 13 h := newNoneHash() 14 15 p := []byte("foo") 16 q := h.Sum(p) 17 18 if !bytes.Equal(q, p) { 19 t.Fatalf("h.Sum: got %q; want %q", q, p) 20 } 21 22} 23