Test the number of replies matches the number of nonces.
If CreateReplies returns too few replies, the test would still pass.
Change-Id: I7a3c7781d0dd17fa8f2b688daea3c40e25175e98
diff --git a/go/protocol/protocol_test.go b/go/protocol/protocol_test.go
index c6a9c50..3c1e9e4 100644
--- a/go/protocol/protocol_test.go
+++ b/go/protocol/protocol_test.go
@@ -110,6 +110,10 @@
t.Fatal(err)
}
+ if len(replies) != len(nonces) {
+ t.Fatalf("received %d replies for %d nonces", len(replies), len(nonces))
+ }
+
for i, reply := range replies {
midpoint, radius, err := VerifyReply(reply, rootPublicKey, nonces[i])
if err != nil {