add more tests

This commit is contained in:
kevin
2020-09-30 17:47:56 +08:00
parent 9e9ce3bf48
commit 481895d1e4
5 changed files with 13 additions and 5 deletions

View File

@@ -73,6 +73,9 @@ func TestDiffieHellmanMiddleManAttack(t *testing.T) {
}
func TestKeyBytes(t *testing.T) {
var empty DhKey
assert.Equal(t, 0, len(empty.Bytes()))
key, err := GenerateKey()
assert.Nil(t, err)
assert.True(t, len(key.Bytes()) > 0)