summaryrefslogtreecommitdiffstats
path: root/libgo/go/net/url/url_test.go
diff options
context:
space:
mode:
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2012-03-02 20:01:37 +0000
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2012-03-02 20:01:37 +0000
commitef10b1dda693467283a3645a5da610e810149764 (patch)
tree3eeb8918d39d675108073c8b76d6dd10586a608c /libgo/go/net/url/url_test.go
parentea6ad4ae9afbd45b5c19aadab39ddbf1db0d50f8 (diff)
downloadppe42-gcc-ef10b1dda693467283a3645a5da610e810149764.tar.gz
ppe42-gcc-ef10b1dda693467283a3645a5da610e810149764.zip
libgo: Update to weekly.2012-02-22 release.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@184819 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgo/go/net/url/url_test.go')
-rw-r--r--libgo/go/net/url/url_test.go35
1 files changed, 5 insertions, 30 deletions
diff --git a/libgo/go/net/url/url_test.go b/libgo/go/net/url/url_test.go
index 9fe5ff886b7..2d911ed505a 100644
--- a/libgo/go/net/url/url_test.go
+++ b/libgo/go/net/url/url_test.go
@@ -188,22 +188,6 @@ var urltests = []URLTest{
},
"http://user:password@google.com",
},
-}
-
-var urlnofragtests = []URLTest{
- {
- "http://www.google.com/?q=go+language#foo",
- &URL{
- Scheme: "http",
- Host: "www.google.com",
- Path: "/",
- RawQuery: "q=go+language#foo",
- },
- "",
- },
-}
-
-var urlfragtests = []URLTest{
{
"http://www.google.com/?q=go+language#foo",
&URL{
@@ -257,12 +241,6 @@ func DoTest(t *testing.T, parse func(string) (*URL, error), name string, tests [
func TestParse(t *testing.T) {
DoTest(t, Parse, "Parse", urltests)
- DoTest(t, Parse, "Parse", urlnofragtests)
-}
-
-func TestParseWithReference(t *testing.T) {
- DoTest(t, ParseWithReference, "ParseWithReference", urltests)
- DoTest(t, ParseWithReference, "ParseWithReference", urlfragtests)
}
const pathThatLooksSchemeRelative = "//not.a.user@not.a.host/just/a/path"
@@ -281,16 +259,16 @@ var parseRequestUrlTests = []struct {
{"../dir/", false},
}
-func TestParseRequest(t *testing.T) {
+func TestParseRequestURI(t *testing.T) {
for _, test := range parseRequestUrlTests {
- _, err := ParseRequest(test.url)
+ _, err := ParseRequestURI(test.url)
valid := err == nil
if valid != test.expectedValid {
t.Errorf("Expected valid=%v for %q; got %v", test.expectedValid, test.url, valid)
}
}
- url, err := ParseRequest(pathThatLooksSchemeRelative)
+ url, err := ParseRequestURI(pathThatLooksSchemeRelative)
if err != nil {
t.Fatalf("Unexpected error %v", err)
}
@@ -319,9 +297,6 @@ func DoTestString(t *testing.T, parse func(string) (*URL, error), name string, t
func TestURLString(t *testing.T) {
DoTestString(t, Parse, "Parse", urltests)
- DoTestString(t, Parse, "Parse", urlnofragtests)
- DoTestString(t, ParseWithReference, "ParseWithReference", urltests)
- DoTestString(t, ParseWithReference, "ParseWithReference", urlfragtests)
}
type EscapeTest struct {
@@ -538,7 +513,7 @@ var resolveReferenceTests = []struct {
func TestResolveReference(t *testing.T) {
mustParse := func(url string) *URL {
- u, err := ParseWithReference(url)
+ u, err := Parse(url)
if err != nil {
t.Fatalf("Expected URL to parse: %q, got error: %v", url, err)
}
@@ -589,7 +564,7 @@ func TestResolveReference(t *testing.T) {
func TestResolveReferenceOpaque(t *testing.T) {
mustParse := func(url string) *URL {
- u, err := ParseWithReference(url)
+ u, err := Parse(url)
if err != nil {
t.Fatalf("Expected URL to parse: %q, got error: %v", url, err)
}
OpenPOWER on IntegriCloud