summaryrefslogtreecommitdiffstats
path: root/lib/hash_test.go
blob: bde6b3f7c1a21fa4479b5a150c2c91abdafa0f8b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// Copyright © 2022 siddharth <s@ricketyspace.net>
// SPDX-License-Identifier: ISC

package lib

import (
	"testing"
)

func TestShaShr(t *testing.T) {
	s := uint32(256)
	sr := shaShr(s, 2)
	if sr != s>>2 {
		t.Errorf("shaShr test failed")
	}
}