mirror of
https://github.com/emmansun/gmsm.git
synced 2025-04-26 12:16:20 +08:00
reduce test times for short mode
This commit is contained in:
parent
91f08d464d
commit
8e5c2951be
@ -47,8 +47,12 @@ func Test_sample2(t *testing.T) {
|
||||
}
|
||||
dst := make([]byte, 16)
|
||||
copy(dst, src)
|
||||
|
||||
for i := 0; i < 1000000; i++ {
|
||||
n := 1000000
|
||||
if testing.Short() {
|
||||
n = 1000
|
||||
expected = []byte{215, 53, 233, 28, 197, 104, 156, 243, 18, 188, 193, 239, 183, 64, 232, 19}
|
||||
}
|
||||
for i := 0; i < n; i++ {
|
||||
c.Encrypt(dst, dst)
|
||||
}
|
||||
if !reflect.DeepEqual(dst, expected) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user