Skip to content
Snippets Groups Projects
Commit 70963e22 authored by Richard T. Carback III's avatar Richard T. Carback III
Browse files

Fix tests

parent ddd13481
No related branches found
No related tags found
2 merge requests!117Release,!73Quantum secure xx messenger key negotiation
...@@ -40,7 +40,7 @@ func TestNewBaseFormat(t *testing.T) { ...@@ -40,7 +40,7 @@ func TestNewBaseFormat(t *testing.T) {
} }
expectedEcrPayloadSize := payloadSize - (pubKeySize + expectedEcrPayloadSize := payloadSize - (pubKeySize +
sidhinterface.PubKeyByteSize + saltSize) sidhinterface.PubKeyByteSize + saltSize + 1)
if !bytes.Equal(baseMsg.ecrPayload, make([]byte, expectedEcrPayloadSize)) { if !bytes.Equal(baseMsg.ecrPayload, make([]byte, expectedEcrPayloadSize)) {
t.Errorf("NewBaseFormat error: "+ t.Errorf("NewBaseFormat error: "+
"Unexpected payload field in base format."+ "Unexpected payload field in base format."+
...@@ -136,7 +136,7 @@ func TestBaseFormat_SetGetEcrPayload(t *testing.T) { ...@@ -136,7 +136,7 @@ func TestBaseFormat_SetGetEcrPayload(t *testing.T) {
// Test setter // Test setter
ecrPayloadSize := payloadSize - (pubKeySize + saltSize + ecrPayloadSize := payloadSize - (pubKeySize + saltSize +
sidhinterface.PubKeyByteSize) sidhinterface.PubKeyByteSize + 1)
ecrPayload := newPayload(ecrPayloadSize, "ecrPayload") ecrPayload := newPayload(ecrPayloadSize, "ecrPayload")
baseMsg.SetEcrPayload(ecrPayload) baseMsg.SetEcrPayload(ecrPayload)
if !bytes.Equal(ecrPayload, baseMsg.ecrPayload) { if !bytes.Equal(ecrPayload, baseMsg.ecrPayload) {
...@@ -173,7 +173,7 @@ func TestBaseFormat_MarshalUnmarshal(t *testing.T) { ...@@ -173,7 +173,7 @@ func TestBaseFormat_MarshalUnmarshal(t *testing.T) {
baseMsg := newBaseFormat(payloadSize, pubKeySize, baseMsg := newBaseFormat(payloadSize, pubKeySize,
sidhinterface.PubKeyByteSize) sidhinterface.PubKeyByteSize)
ecrPayloadSize := payloadSize - (pubKeySize + saltSize + ecrPayloadSize := payloadSize - (pubKeySize + saltSize +
sidhinterface.PubKeyByteSize) sidhinterface.PubKeyByteSize + 1)
ecrPayload := newPayload(ecrPayloadSize, "ecrPayload") ecrPayload := newPayload(ecrPayloadSize, "ecrPayload")
baseMsg.SetEcrPayload(ecrPayload) baseMsg.SetEcrPayload(ecrPayload)
salt := newSalt("salt") salt := newSalt("salt")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment