Skip to content

Commit

Permalink
added tests
Browse files Browse the repository at this point in the history
Signed-off-by: bytemare <[email protected]>
  • Loading branch information
bytemare committed Jun 8, 2024
1 parent a06d587 commit d5a539b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/errors_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,15 @@ func Test_NewVerifiable_POPRFNotSet(t *testing.T) {
})
}

func Test_Serde_Evaluation_CiphersuiteNotSet(t *testing.T) {
errDecodeNoCiphersuite := errors.New("decoding error: ciphersuite not set")
eval := new(voprf.Evaluation)

if err := eval.Deserialize(nil); err == nil || err.Error() != errDecodeNoCiphersuite.Error() {
t.Errorf("expected error starts with %q, got %q", errDecodeNoCiphersuite, err)
}
}

func Test_Serde_Evaluation_TooShort(t *testing.T) {
errUnmarshalEvaluationShort := errors.New("decoding error: insufficient data length")

Expand Down

0 comments on commit d5a539b

Please sign in to comment.