21 lines
407 B
Go
21 lines
407 B
Go
package s3crypto
|
|
|
|
import (
|
|
"testing"
|
|
)
|
|
|
|
func TestGenerateBytes(t *testing.T) {
|
|
b := generateBytes(5)
|
|
if e, a := 5, len(b); e != a {
|
|
t.Errorf("expected %d, but received %d", e, a)
|
|
}
|
|
b = generateBytes(0)
|
|
if e, a := 0, len(b); e != a {
|
|
t.Errorf("expected %d, but received %d", e, a)
|
|
}
|
|
b = generateBytes(1024)
|
|
if e, a := 1024, len(b); e != a {
|
|
t.Errorf("expected %d, but received %d", e, a)
|
|
}
|
|
}
|