mirror of https://github.com/v2ray/v2ray-core
parent
02a803262f
commit
dc1fbecdfb
@ -1,35 +0,0 @@
|
||||
package protocol
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/v2ray/v2ray-core/testing/fuzzing"
|
||||
)
|
||||
|
||||
const (
|
||||
Iterations = int(500000)
|
||||
)
|
||||
|
||||
func TestReadAuthentication(t *testing.T) {
|
||||
for i := 0; i < Iterations; i++ {
|
||||
ReadAuthentication(fuzzing.RandomReader())
|
||||
}
|
||||
}
|
||||
|
||||
func TestReadUserPassRequest(t *testing.T) {
|
||||
for i := 0; i < Iterations; i++ {
|
||||
ReadUserPassRequest(fuzzing.RandomReader())
|
||||
}
|
||||
}
|
||||
|
||||
func TestReadRequest(t *testing.T) {
|
||||
for i := 0; i < Iterations; i++ {
|
||||
ReadRequest(fuzzing.RandomReader())
|
||||
}
|
||||
}
|
||||
|
||||
func TestReadUDPRequest(t *testing.T) {
|
||||
for i := 0; i < Iterations; i++ {
|
||||
ReadUDPRequest(fuzzing.RandomBytes())
|
||||
}
|
||||
}
|
@ -1,15 +0,0 @@
|
||||
package protocol
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/v2ray/v2ray-core/proxy/vmess/protocol/user/testing/mocks"
|
||||
"github.com/v2ray/v2ray-core/testing/fuzzing"
|
||||
)
|
||||
|
||||
func TestVMessRequestReader(t *testing.T) {
|
||||
reader := NewVMessRequestReader(&mocks.StaticUserSet{})
|
||||
for i := 0; i < 1000000; i++ {
|
||||
reader.Read(fuzzing.RandomReader())
|
||||
}
|
||||
}
|
Loading…
Reference in new issue