From 5572670ee868f43a2abba5e0de882bd905f1df0a Mon Sep 17 00:00:00 2001 From: axtloss Date: Sun, 3 Mar 2024 19:49:31 +0100 Subject: Add basic test units --- verifysetup/core/crypt_test.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 verifysetup/core/crypt_test.go (limited to 'verifysetup') diff --git a/verifysetup/core/crypt_test.go b/verifysetup/core/crypt_test.go new file mode 100644 index 0000000..7a66056 --- /dev/null +++ b/verifysetup/core/crypt_test.go @@ -0,0 +1,12 @@ +package core + +import "testing" + +func TestCalculateBlockHash(t *testing.T) { + got, err := CalculateBlockHash([]byte("hello")) + want := "aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434d" + + if got != want || err != nil { + t.Errorf("got %s, wanted %s", got, want) + } +} -- cgit v1.2.3