socks_fuzz_test.go 437 B

12345678910111213141516171819202122232425262728
  1. package protocol
  2. import (
  3. "crypto/rand"
  4. "testing"
  5. )
  6. const (
  7. Iterations = int(500000)
  8. )
  9. func TestReadAuthentication(t *testing.T) {
  10. for i := 0; i < Iterations; i++ {
  11. ReadAuthentication(rand.Reader)
  12. }
  13. }
  14. func TestReadUserPassRequest(t *testing.T) {
  15. for i := 0; i < Iterations; i++ {
  16. ReadUserPassRequest(rand.Reader)
  17. }
  18. }
  19. func TestReadRequest(t *testing.T) {
  20. for i := 0; i < Iterations; i++ {
  21. ReadRequest(rand.Reader)
  22. }
  23. }