Fixed tests

This commit is contained in:
2025-12-11 15:25:24 -07:00
parent ad201adade
commit 302979b01a

View File

@@ -5,6 +5,7 @@ import (
"crypto/ecdh"
"crypto/rand"
"encoding/hex"
"fmt"
"strings"
"testing"
)
@@ -792,7 +793,8 @@ func TestRandomMessageSizes(t *testing.T) {
sizes := []int{0, 1, 15, 16, 17, 31, 32, 33, 63, 64, 65, 127, 128, 256, 512, 1000, 4096}
for _, size := range sizes {
t.Run(string(rune(size)), func(t *testing.T) {
size := size // capture range variable
t.Run(fmt.Sprintf("%d_bytes", size), func(t *testing.T) {
plaintext := make([]byte, size)
if size > 0 {
rand.Read(plaintext)