2021-06-28 17:05:29 +03:00
|
|
|
package binding
|
|
|
|
|
|
|
|
import (
|
|
|
|
"errors"
|
|
|
|
"strconv"
|
|
|
|
"testing"
|
|
|
|
)
|
|
|
|
|
2021-11-21 16:45:03 +03:00
|
|
|
func BenchmarkSliceValidationError(b *testing.B) {
|
2021-06-28 17:05:29 +03:00
|
|
|
const size int = 100
|
|
|
|
for i := 0; i < b.N; i++ {
|
2021-11-21 16:45:03 +03:00
|
|
|
e := make(SliceValidationError, size)
|
2021-06-28 17:05:29 +03:00
|
|
|
for j := 0; j < size; j++ {
|
|
|
|
e[j] = errors.New(strconv.Itoa(j))
|
|
|
|
}
|
|
|
|
if len(e.Error()) == 0 {
|
|
|
|
b.Errorf("error")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|