mirror of
https://github.com/xjasonlyu/tun2socks.git
synced 2024-12-30 02:37:01 +00:00
32 lines
449 B
Go
32 lines
449 B
Go
package proxy
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/suite"
|
|
)
|
|
|
|
type URLTestSuite struct {
|
|
suite.Suite
|
|
}
|
|
|
|
func (s *URLTestSuite) TestAddress() {
|
|
tests := []struct {
|
|
u *URL
|
|
expected string
|
|
}{
|
|
{
|
|
MustParseURL("http://example.com/"),
|
|
"http://example.com",
|
|
},
|
|
}
|
|
for _, tt := range tests {
|
|
s.Assert().Equal(tt.expected, tt.u.String())
|
|
}
|
|
|
|
}
|
|
|
|
func TestURLTestSuite(t *testing.T) {
|
|
suite.Run(t, new(URLTestSuite))
|
|
}
|