mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-08-08 08:38:50 +00:00
29 lines
437 B
Go
29 lines
437 B
Go
![]() |
package protocol
|
||
|
|
||
|
import (
|
||
|
"crypto/rand"
|
||
|
"testing"
|
||
|
)
|
||
|
|
||
|
const (
|
||
|
Iterations = int(500000)
|
||
|
)
|
||
|
|
||
|
func TestReadAuthentication(t *testing.T) {
|
||
|
for i := 0; i < Iterations; i++ {
|
||
|
ReadAuthentication(rand.Reader)
|
||
|
}
|
||
|
}
|
||
|
|
||
|
func TestReadUserPassRequest(t *testing.T) {
|
||
|
for i := 0; i < Iterations; i++ {
|
||
|
ReadUserPassRequest(rand.Reader)
|
||
|
}
|
||
|
}
|
||
|
|
||
|
func TestReadRequest(t *testing.T) {
|
||
|
for i := 0; i < Iterations; i++ {
|
||
|
ReadRequest(rand.Reader)
|
||
|
}
|
||
|
}
|