Paperchain is a blockchain-based distributed application for taking contemporaneous notes that are cryptographically verifiable.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
506 B

package main
import (
"testing"
"paperchain.cc/paperchain/utils"
)
func TestHashStruct(t *testing.T) {
test := utils.PcData{
Case: utils.PcCase{
ID: "TEST01",
Name: "Test Case",
},
Examiner: utils.PcExaminer{
ID: "TEST01_user",
Name: "Test User",
Phone: "01",
Email: "user@test.com",
Org: "Test Inc.",
},
NoteID: 0,
Nonce: 0,
}
str := utils.HashStruct(test)
if str != "4cd7b1862d242647981e3076a12004870ac262f88838a1d0a466a14ac6260e7f" {
t.Error()
}
}