MCPcopy Index your code
hub / github.com/CovenantSQL/CovenantSQL / TestNewAnswer

Function TestNewAnswer

sqlchain/storageproof_test.go:38–49  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

36)
37
38func TestNewAnswer(t *testing.T) {
39 wantedAnswer := Answer{
40 PreviousBlockID: "aaa",
41 NodeID: "bbb",
42 Answer: hash.HashH([]byte{1, 2, 3, 4, 5}),
43 }
44 answer := NewAnswer("aaa", "bbb", hash.HashH([]byte{1, 2, 3, 4, 5}))
45
46 if !reflect.DeepEqual(*answer, wantedAnswer) {
47 t.Errorf("the answer is %+v, should be %+v", answer, wantedAnswer)
48 }
49}
50
51func TestGetNextPuzzle(t *testing.T) {
52 var totalRecordsInSQLChain int32 = 10

Callers

nothing calls this directly

Calls 3

HashHFunction · 0.92
NewAnswerFunction · 0.85
ErrorfMethod · 0.80

Tested by

no test coverage detected