aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/hash/hash_test.go
blob: ababda47e7fa19268fee66d3ee3285b9af5db8a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// Copyright 2026 syzkaller project authors. All rights reserved.
// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.

package hash

import (
	"testing"
)

func TestHash(t *testing.T) {
	type X struct {
		Int int
	}
	if String([]byte{}) == String([]byte{0}) {
		t.Fatal("equal hashes")
	}
	if String("foo") == String("bar") {
		t.Fatal("equal hashes")
	}
	if String(X{0}) == String(X{1}) {
		t.Fatal("equal hashes")
	}
}