Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(368)

Unified Diff: runtime/vm/uri_test.cc

Issue 2481873005: clang-format runtime/vm (Closed)
Patch Set: Merge Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/uri.cc ('k') | runtime/vm/verifier.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/uri_test.cc
diff --git a/runtime/vm/uri_test.cc b/runtime/vm/uri_test.cc
index 34631a58cd1e150c5adc85e7d249e18c872055e3..14f26fbb444fc7326c0ffa6cd1773bf60d00c853 100644
--- a/runtime/vm/uri_test.cc
+++ b/runtime/vm/uri_test.cc
@@ -48,8 +48,8 @@ TEST_CASE(ParseUri_WithScheme_WithFragment) {
TEST_CASE(ParseUri_WithScheme_WithQueryWithFragment) {
ParsedUri uri;
- EXPECT(ParseUri("foo://example.com:8042/over/there?name=ferret#fragment",
- &uri));
+ EXPECT(
+ ParseUri("foo://example.com:8042/over/there?name=ferret#fragment", &uri));
EXPECT_STREQ("foo", uri.scheme);
EXPECT(uri.userinfo == NULL);
EXPECT_STREQ("example.com", uri.host);
@@ -244,8 +244,8 @@ TEST_CASE(ParseUri_LowerCaseScheme) {
TEST_CASE(ParseUri_NormalizeEscapes_PathQueryFragment) {
ParsedUri uri;
- EXPECT(ParseUri(
- "scheme:/This%09Is A P%61th?This%09Is A Qu%65ry#A Fr%61gment", &uri));
+ EXPECT(ParseUri("scheme:/This%09Is A P%61th?This%09Is A Qu%65ry#A Fr%61gment",
+ &uri));
EXPECT_STREQ("scheme", uri.scheme);
EXPECT(uri.userinfo == NULL);
EXPECT(uri.host == NULL);
@@ -258,8 +258,7 @@ TEST_CASE(ParseUri_NormalizeEscapes_PathQueryFragment) {
TEST_CASE(ParseUri_NormalizeEscapes_UppercaseEscapesPreferred) {
ParsedUri uri;
- EXPECT(ParseUri(
- "scheme:/%1b%1B", &uri));
+ EXPECT(ParseUri("scheme:/%1b%1B", &uri));
EXPECT_STREQ("scheme", uri.scheme);
EXPECT(uri.userinfo == NULL);
EXPECT(uri.host == NULL);
@@ -272,8 +271,7 @@ TEST_CASE(ParseUri_NormalizeEscapes_UppercaseEscapesPreferred) {
TEST_CASE(ParseUri_NormalizeEscapes_Authority) {
ParsedUri uri;
- EXPECT(ParseUri(
- "scheme://UsEr N%61%4de@h%4FsT.c%6fm:80/", &uri));
+ EXPECT(ParseUri("scheme://UsEr N%61%4de@h%4FsT.c%6fm:80/", &uri));
EXPECT_STREQ("scheme", uri.scheme);
EXPECT_STREQ("UsEr%20NaMe", uri.userinfo); // Normalized, case preserved.
EXPECT_STREQ("host.com", uri.host); // Normalized, lower-cased.
@@ -299,8 +297,7 @@ TEST_CASE(ParseUri_NormalizeEscapes_UppercaseEscapeInHost) {
TEST_CASE(ParseUri_BrokenEscapeSequence) {
ParsedUri uri;
- EXPECT(ParseUri(
- "scheme:/%1g", &uri));
+ EXPECT(ParseUri("scheme:/%1g", &uri));
EXPECT_STREQ("scheme", uri.scheme);
EXPECT(uri.userinfo == NULL);
EXPECT(uri.host == NULL);
@@ -340,8 +337,7 @@ TEST_CASE(ResolveUri_NoScheme_WithAuthority) {
TEST_CASE(ResolveUri_NoSchemeNoAuthority_AbsolutePath) {
const char* target_uri;
- EXPECT(ResolveUri("/ref/path",
- "bscheme://buser@bhost:11/base/path?baseQuery",
+ EXPECT(ResolveUri("/ref/path", "bscheme://buser@bhost:11/base/path?baseQuery",
&target_uri));
EXPECT_STREQ("bscheme://buser@bhost:11/ref/path", target_uri);
}
@@ -349,8 +345,7 @@ TEST_CASE(ResolveUri_NoSchemeNoAuthority_AbsolutePath) {
TEST_CASE(ResolveUri_NoSchemeNoAuthority_RelativePath) {
const char* target_uri;
- EXPECT(ResolveUri("ref/path",
- "bscheme://buser@bhost:11/base/path?baseQuery",
+ EXPECT(ResolveUri("ref/path", "bscheme://buser@bhost:11/base/path?baseQuery",
&target_uri));
EXPECT_STREQ("bscheme://buser@bhost:11/base/ref/path", target_uri);
}
@@ -358,18 +353,14 @@ TEST_CASE(ResolveUri_NoSchemeNoAuthority_RelativePath) {
TEST_CASE(ResolveUri_NoSchemeNoAuthority_RelativePathEmptyBasePath) {
const char* target_uri;
- EXPECT(ResolveUri("ref/path",
- "bscheme://buser@bhost:11",
- &target_uri));
+ EXPECT(ResolveUri("ref/path", "bscheme://buser@bhost:11", &target_uri));
EXPECT_STREQ("bscheme://buser@bhost:11/ref/path", target_uri);
}
TEST_CASE(ResolveUri_NoSchemeNoAuthority_RelativePathWeirdBasePath) {
const char* target_uri;
- EXPECT(ResolveUri("ref/path",
- "bscheme:base",
- &target_uri));
+ EXPECT(ResolveUri("ref/path", "bscheme:base", &target_uri));
EXPECT_STREQ("bscheme:ref/path", target_uri);
}
@@ -405,36 +396,28 @@ TEST_CASE(ResolveUri_NoSchemeNoAuthority_EmptyPathWithFragment) {
TEST_CASE(ResolveUri_RemoveDots_RemoveOneDotSegment) {
const char* target_uri;
- EXPECT(ResolveUri("./refpath",
- "scheme://auth/a/b/c/d",
- &target_uri));
+ EXPECT(ResolveUri("./refpath", "scheme://auth/a/b/c/d", &target_uri));
EXPECT_STREQ("scheme://auth/a/b/c/refpath", target_uri);
}
TEST_CASE(ResolveUri_RemoveDots_RemoveTwoDotSegments) {
const char* target_uri;
- EXPECT(ResolveUri("././refpath",
- "scheme://auth/a/b/c/d",
- &target_uri));
+ EXPECT(ResolveUri("././refpath", "scheme://auth/a/b/c/d", &target_uri));
EXPECT_STREQ("scheme://auth/a/b/c/refpath", target_uri);
}
TEST_CASE(ResolveUri_RemoveDots_RemoveOneDotDotSegment) {
const char* target_uri;
- EXPECT(ResolveUri("../refpath",
- "scheme://auth/a/b/c/d",
- &target_uri));
+ EXPECT(ResolveUri("../refpath", "scheme://auth/a/b/c/d", &target_uri));
EXPECT_STREQ("scheme://auth/a/b/refpath", target_uri);
}
TEST_CASE(ResolveUri_RemoveDots_RemoveTwoDotDotSegments) {
const char* target_uri;
- EXPECT(ResolveUri("../../refpath",
- "scheme://auth/a/b/c/d",
- &target_uri));
+ EXPECT(ResolveUri("../../refpath", "scheme://auth/a/b/c/d", &target_uri));
EXPECT_STREQ("scheme://auth/a/refpath", target_uri);
}
@@ -442,47 +425,36 @@ TEST_CASE(ResolveUri_RemoveDots_RemoveTwoDotDotSegments) {
TEST_CASE(ResolveUri_RemoveDots_RemoveTooManyDotDotSegments) {
const char* target_uri;
EXPECT(ResolveUri("../../../../../../../../../refpath",
- "scheme://auth/a/b/c/d",
- &target_uri));
+ "scheme://auth/a/b/c/d", &target_uri));
EXPECT_STREQ("scheme://auth/refpath", target_uri);
}
TEST_CASE(ResolveUri_RemoveDots_RemoveDotSegmentsNothingLeft1) {
const char* target_uri;
- EXPECT(ResolveUri("../../../../..",
- "scheme://auth/a/b/c/d",
- &target_uri));
+ EXPECT(ResolveUri("../../../../..", "scheme://auth/a/b/c/d", &target_uri));
EXPECT_STREQ("scheme://auth/", target_uri);
}
-
TEST_CASE(ResolveUri_RemoveDots_RemoveDotSegmentsNothingLeft2) {
const char* target_uri;
- EXPECT(ResolveUri(".",
- "scheme://auth/",
- &target_uri));
+ EXPECT(ResolveUri(".", "scheme://auth/", &target_uri));
EXPECT_STREQ("scheme://auth/", target_uri);
}
-
TEST_CASE(ResolveUri_RemoveDots_RemoveDotSegmentsInitialPrefix) {
const char* target_uri;
- EXPECT(ResolveUri("../../../../refpath",
- "scheme://auth",
- &target_uri));
+ EXPECT(ResolveUri("../../../../refpath", "scheme://auth", &target_uri));
EXPECT_STREQ("scheme://auth/refpath", target_uri);
}
-
TEST_CASE(ResolveUri_RemoveDots_RemoveDotSegmentsMixed) {
const char* target_uri;
EXPECT(ResolveUri("../../1/./2/../3/4/../5/././6/../7",
- "scheme://auth/a/b/c/d/e",
- &target_uri));
+ "scheme://auth/a/b/c/d/e", &target_uri));
EXPECT_STREQ("scheme://auth/a/b/1/3/5/7", target_uri);
}
@@ -500,19 +472,15 @@ TEST_CASE(ResolveUri_NormalizeEscapes_PathQueryFragment) {
TEST_CASE(ResolveUri_NormalizeEscapes_UppercaseHexPreferred) {
const char* target_uri;
- EXPECT(ResolveUri("",
- "scheme:/%1b%1B",
- &target_uri));
- EXPECT_STREQ("scheme:/%1B%1B",
- target_uri);
+ EXPECT(ResolveUri("", "scheme:/%1b%1B", &target_uri));
+ EXPECT_STREQ("scheme:/%1B%1B", target_uri);
}
TEST_CASE(ResolveUri_NormalizeEscapes_Authority) {
const char* target_uri;
- EXPECT(ResolveUri("",
- "scheme://UsEr N%61%4de@h%4FsT.c%6fm:80/",
- &target_uri));
+ EXPECT(
+ ResolveUri("", "scheme://UsEr N%61%4de@h%4FsT.c%6fm:80/", &target_uri));
// userinfo is normalized and case is preserved. host is normalized
// and lower-cased.
EXPECT_STREQ("scheme://UsEr%20NaMe@host.com:80/", target_uri);
@@ -521,18 +489,30 @@ TEST_CASE(ResolveUri_NormalizeEscapes_Authority) {
TEST_CASE(ResolveUri_NormalizeEscapes_BrokenEscapeSequence) {
const char* target_uri;
- EXPECT(ResolveUri("",
- "scheme:/%1g",
- &target_uri));
+ EXPECT(ResolveUri("", "scheme:/%1g", &target_uri));
// We don't change broken escape sequences.
- EXPECT_STREQ("scheme:/%1g",
- target_uri);
+ EXPECT_STREQ("scheme:/%1g", target_uri);
}
TEST_CASE(ResolveUri_DataUri) {
const char* data_uri =
- "data:application/dart;charset=utf-8,%20%20%20%20%20%20%20%20import%20%22dart:isolate%22;%0A%0A%20%20%20%20%20%20%20%20import%20%22package:stream_channel/stream_channel.dart%22;%0A%0A%20%20%20%20%20%20%20%20import%20%22package:test/src/runner/plugin/remote_platform_helpers.dart%22;%0A%20%20%20%20%20%20%20%20import%20%22package:test/src/runner/vm/catch_isolate_errors.dart%22;%0A%0A%20%20%20%20%20%20%20%20import%20%22file:///home/sra/xxxx/dev_compiler/test/all_tests.dart%22%20as%20test;%0A%0A%20%20%20%20%20%20%20%20void%20main(_,%20SendPort%20message)%20%7B%0A%20%20%20%20%20%20%20%20%20%20var%20channel%20=%20serializeSuite(()%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20catchIsolateErrors();%0A%20%20%20%20%20%20%20%20%20%20%20%20return%20test.main;%0A%20%20%20%20%20%20%20%20%20%20%7D);%0A%20%20%20%20%20%20%20%20%20%20new%20IsolateChannel.connectSend(message).pipe(channel);%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20"; // NOLINT
+ "data:application/"
+ "dart;charset=utf-8,%20%20%20%20%20%20%20%20import%20%22dart:isolate%22;%"
+ "0A%0A%20%20%20%20%20%20%20%20import%20%22package:stream_channel/"
+ "stream_channel.dart%22;%0A%0A%20%20%20%20%20%20%20%20import%20%"
+ "22package:test/src/runner/plugin/"
+ "remote_platform_helpers.dart%22;%0A%20%20%20%20%20%20%20%20import%20%"
+ "22package:test/src/runner/vm/"
+ "catch_isolate_errors.dart%22;%0A%0A%20%20%20%20%20%20%20%20import%20%"
+ "22file:///home/sra/xxxx/dev_compiler/test/"
+ "all_tests.dart%22%20as%20test;%0A%0A%20%20%20%20%20%20%20%20void%20main("
+ "_,%20SendPort%20message)%20%7B%0A%20%20%20%20%20%20%20%20%20%20var%"
+ "20channel%20=%20serializeSuite(()%20%7B%0A%20%20%20%20%20%20%20%20%20%"
+ "20%20%20catchIsolateErrors();%0A%20%20%20%20%20%20%20%20%20%20%20%"
+ "20return%20test.main;%0A%20%20%20%20%20%20%20%20%20%20%7D);%0A%20%20%20%"
+ "20%20%20%20%20%20%20new%20IsolateChannel.connectSend(message).pipe("
+ "channel);%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20";
const char* target_uri;
EXPECT(ResolveUri(data_uri,
@@ -581,51 +561,51 @@ TEST_CASE(ResolveUri_TestUriPerRFCs) {
const char* base = "http://a/b/c/d;p?q";
// From RFC 3986
- EXPECT_STREQ("g:h", TestResolve(base, "g:h"));
- EXPECT_STREQ("http://a/b/c/g", TestResolve(base, "g"));
- EXPECT_STREQ("http://a/b/c/g", TestResolve(base, "./g"));
- EXPECT_STREQ("http://a/b/c/g/", TestResolve(base, "g/"));
- EXPECT_STREQ("http://a/g", TestResolve(base, "/g"));
- EXPECT_STREQ("http://g", TestResolve(base, "//g"));
- EXPECT_STREQ("http://a/b/c/d;p?y", TestResolve(base, "?y"));
- EXPECT_STREQ("http://a/b/c/g?y", TestResolve(base, "g?y"));
- EXPECT_STREQ("http://a/b/c/d;p?q#s", TestResolve(base, "#s"));
- EXPECT_STREQ("http://a/b/c/g#s", TestResolve(base, "g#s"));
- EXPECT_STREQ("http://a/b/c/g?y#s", TestResolve(base, "g?y#s"));
- EXPECT_STREQ("http://a/b/c/;x", TestResolve(base, ";x"));
- EXPECT_STREQ("http://a/b/c/g;x", TestResolve(base, "g;x"));
- EXPECT_STREQ("http://a/b/c/g;x?y#s", TestResolve(base, "g;x?y#s"));
- EXPECT_STREQ("http://a/b/c/d;p?q", TestResolve(base, ""));
- EXPECT_STREQ("http://a/b/c/", TestResolve(base, "."));
- EXPECT_STREQ("http://a/b/c/", TestResolve(base, "./"));
- EXPECT_STREQ("http://a/b/", TestResolve(base, ".."));
- EXPECT_STREQ("http://a/b/", TestResolve(base, "../"));
- EXPECT_STREQ("http://a/b/g", TestResolve(base, "../g"));
- EXPECT_STREQ("http://a/", TestResolve(base, "../.."));
- EXPECT_STREQ("http://a/", TestResolve(base, "../../"));
- EXPECT_STREQ("http://a/g", TestResolve(base, "../../g"));
- EXPECT_STREQ("http://a/g", TestResolve(base, "../../../g"));
- EXPECT_STREQ("http://a/g", TestResolve(base, "../../../../g"));
- EXPECT_STREQ("http://a/g", TestResolve(base, "/./g"));
- EXPECT_STREQ("http://a/g", TestResolve(base, "/../g"));
- EXPECT_STREQ("http://a/b/c/g.", TestResolve(base, "g."));
- EXPECT_STREQ("http://a/b/c/.g", TestResolve(base, ".g"));
- EXPECT_STREQ("http://a/b/c/g..", TestResolve(base, "g.."));
- EXPECT_STREQ("http://a/b/c/..g", TestResolve(base, "..g"));
- EXPECT_STREQ("http://a/b/g", TestResolve(base, "./../g"));
- EXPECT_STREQ("http://a/b/c/g/", TestResolve(base, "./g/."));
- EXPECT_STREQ("http://a/b/c/g/h", TestResolve(base, "g/./h"));
- EXPECT_STREQ("http://a/b/c/h", TestResolve(base, "g/../h"));
- EXPECT_STREQ("http://a/b/c/g;x=1/y", TestResolve(base, "g;x=1/./y"));
- EXPECT_STREQ("http://a/b/c/y", TestResolve(base, "g;x=1/../y"));
- EXPECT_STREQ("http://a/b/c/g?y/./x", TestResolve(base, "g?y/./x"));
+ EXPECT_STREQ("g:h", TestResolve(base, "g:h"));
+ EXPECT_STREQ("http://a/b/c/g", TestResolve(base, "g"));
+ EXPECT_STREQ("http://a/b/c/g", TestResolve(base, "./g"));
+ EXPECT_STREQ("http://a/b/c/g/", TestResolve(base, "g/"));
+ EXPECT_STREQ("http://a/g", TestResolve(base, "/g"));
+ EXPECT_STREQ("http://g", TestResolve(base, "//g"));
+ EXPECT_STREQ("http://a/b/c/d;p?y", TestResolve(base, "?y"));
+ EXPECT_STREQ("http://a/b/c/g?y", TestResolve(base, "g?y"));
+ EXPECT_STREQ("http://a/b/c/d;p?q#s", TestResolve(base, "#s"));
+ EXPECT_STREQ("http://a/b/c/g#s", TestResolve(base, "g#s"));
+ EXPECT_STREQ("http://a/b/c/g?y#s", TestResolve(base, "g?y#s"));
+ EXPECT_STREQ("http://a/b/c/;x", TestResolve(base, ";x"));
+ EXPECT_STREQ("http://a/b/c/g;x", TestResolve(base, "g;x"));
+ EXPECT_STREQ("http://a/b/c/g;x?y#s", TestResolve(base, "g;x?y#s"));
+ EXPECT_STREQ("http://a/b/c/d;p?q", TestResolve(base, ""));
+ EXPECT_STREQ("http://a/b/c/", TestResolve(base, "."));
+ EXPECT_STREQ("http://a/b/c/", TestResolve(base, "./"));
+ EXPECT_STREQ("http://a/b/", TestResolve(base, ".."));
+ EXPECT_STREQ("http://a/b/", TestResolve(base, "../"));
+ EXPECT_STREQ("http://a/b/g", TestResolve(base, "../g"));
+ EXPECT_STREQ("http://a/", TestResolve(base, "../.."));
+ EXPECT_STREQ("http://a/", TestResolve(base, "../../"));
+ EXPECT_STREQ("http://a/g", TestResolve(base, "../../g"));
+ EXPECT_STREQ("http://a/g", TestResolve(base, "../../../g"));
+ EXPECT_STREQ("http://a/g", TestResolve(base, "../../../../g"));
+ EXPECT_STREQ("http://a/g", TestResolve(base, "/./g"));
+ EXPECT_STREQ("http://a/g", TestResolve(base, "/../g"));
+ EXPECT_STREQ("http://a/b/c/g.", TestResolve(base, "g."));
+ EXPECT_STREQ("http://a/b/c/.g", TestResolve(base, ".g"));
+ EXPECT_STREQ("http://a/b/c/g..", TestResolve(base, "g.."));
+ EXPECT_STREQ("http://a/b/c/..g", TestResolve(base, "..g"));
+ EXPECT_STREQ("http://a/b/g", TestResolve(base, "./../g"));
+ EXPECT_STREQ("http://a/b/c/g/", TestResolve(base, "./g/."));
+ EXPECT_STREQ("http://a/b/c/g/h", TestResolve(base, "g/./h"));
+ EXPECT_STREQ("http://a/b/c/h", TestResolve(base, "g/../h"));
+ EXPECT_STREQ("http://a/b/c/g;x=1/y", TestResolve(base, "g;x=1/./y"));
+ EXPECT_STREQ("http://a/b/c/y", TestResolve(base, "g;x=1/../y"));
+ EXPECT_STREQ("http://a/b/c/g?y/./x", TestResolve(base, "g?y/./x"));
EXPECT_STREQ("http://a/b/c/g?y/../x", TestResolve(base, "g?y/../x"));
- EXPECT_STREQ("http://a/b/c/g#s/./x", TestResolve(base, "g#s/./x"));
+ EXPECT_STREQ("http://a/b/c/g#s/./x", TestResolve(base, "g#s/./x"));
EXPECT_STREQ("http://a/b/c/g#s/../x", TestResolve(base, "g#s/../x"));
- EXPECT_STREQ("http:g", TestResolve(base, "http:g"));
+ EXPECT_STREQ("http:g", TestResolve(base, "http:g"));
// Additional tests (not from RFC 3986).
- EXPECT_STREQ("http://a/b/g;p/h;s", TestResolve(base, "../g;p/h;s"));
+ EXPECT_STREQ("http://a/b/g;p/h;s", TestResolve(base, "../g;p/h;s"));
base = "s:a/b";
EXPECT_STREQ("s:/c", TestResolve(base, "../c"));
@@ -635,32 +615,32 @@ TEST_CASE(ResolveUri_TestUriPerRFCs) {
// This test is ported from sdk/tests/corelib/uri_test.dart (testResolvePath).
TEST_CASE(ResolveUri_MoreDotSegmentTests) {
const char* base = "/";
- EXPECT_STREQ("/a/g", TestResolve(base, "/a/b/c/./../../g"));
- EXPECT_STREQ("/a/g", TestResolve(base, "/a/b/c/./../../g"));
- EXPECT_STREQ("/mid/6", TestResolve(base, "mid/content=5/../6"));
- EXPECT_STREQ("/a/b/e", TestResolve(base, "a/b/c/d/../../e"));
- EXPECT_STREQ("/a/b/e", TestResolve(base, "../a/b/c/d/../../e"));
- EXPECT_STREQ("/a/b/e", TestResolve(base, "./a/b/c/d/../../e"));
- EXPECT_STREQ("/a/b/e", TestResolve(base, "../a/b/./c/d/../../e"));
- EXPECT_STREQ("/a/b/e", TestResolve(base, "./a/b/./c/d/../../e"));
+ EXPECT_STREQ("/a/g", TestResolve(base, "/a/b/c/./../../g"));
+ EXPECT_STREQ("/a/g", TestResolve(base, "/a/b/c/./../../g"));
+ EXPECT_STREQ("/mid/6", TestResolve(base, "mid/content=5/../6"));
+ EXPECT_STREQ("/a/b/e", TestResolve(base, "a/b/c/d/../../e"));
+ EXPECT_STREQ("/a/b/e", TestResolve(base, "../a/b/c/d/../../e"));
+ EXPECT_STREQ("/a/b/e", TestResolve(base, "./a/b/c/d/../../e"));
+ EXPECT_STREQ("/a/b/e", TestResolve(base, "../a/b/./c/d/../../e"));
+ EXPECT_STREQ("/a/b/e", TestResolve(base, "./a/b/./c/d/../../e"));
EXPECT_STREQ("/a/b/e/", TestResolve(base, "./a/b/./c/d/../../e/."));
EXPECT_STREQ("/a/b/e/", TestResolve(base, "./a/b/./c/d/../../e/./."));
EXPECT_STREQ("/a/b/e/", TestResolve(base, "./a/b/./c/d/../../e/././."));
- #define LH "http://localhost"
+#define LH "http://localhost"
base = LH;
- EXPECT_STREQ(LH "/a/g", TestResolve(base, "/a/b/c/./../../g"));
- EXPECT_STREQ(LH "/a/g", TestResolve(base, "/a/b/c/./../../g"));
- EXPECT_STREQ(LH "/mid/6", TestResolve(base, "mid/content=5/../6"));
- EXPECT_STREQ(LH "/a/b/e", TestResolve(base, "a/b/c/d/../../e"));
- EXPECT_STREQ(LH "/a/b/e", TestResolve(base, "../a/b/c/d/../../e"));
- EXPECT_STREQ(LH "/a/b/e", TestResolve(base, "./a/b/c/d/../../e"));
- EXPECT_STREQ(LH "/a/b/e", TestResolve(base, "../a/b/./c/d/../../e"));
- EXPECT_STREQ(LH "/a/b/e", TestResolve(base, "./a/b/./c/d/../../e"));
+ EXPECT_STREQ(LH "/a/g", TestResolve(base, "/a/b/c/./../../g"));
+ EXPECT_STREQ(LH "/a/g", TestResolve(base, "/a/b/c/./../../g"));
+ EXPECT_STREQ(LH "/mid/6", TestResolve(base, "mid/content=5/../6"));
+ EXPECT_STREQ(LH "/a/b/e", TestResolve(base, "a/b/c/d/../../e"));
+ EXPECT_STREQ(LH "/a/b/e", TestResolve(base, "../a/b/c/d/../../e"));
+ EXPECT_STREQ(LH "/a/b/e", TestResolve(base, "./a/b/c/d/../../e"));
+ EXPECT_STREQ(LH "/a/b/e", TestResolve(base, "../a/b/./c/d/../../e"));
+ EXPECT_STREQ(LH "/a/b/e", TestResolve(base, "./a/b/./c/d/../../e"));
EXPECT_STREQ(LH "/a/b/e/", TestResolve(base, "./a/b/./c/d/../../e/."));
EXPECT_STREQ(LH "/a/b/e/", TestResolve(base, "./a/b/./c/d/../../e/./."));
EXPECT_STREQ(LH "/a/b/e/", TestResolve(base, "./a/b/./c/d/../../e/././."));
- #undef LH
+#undef LH
}
} // namespace dart
« no previous file with comments | « runtime/vm/uri.cc ('k') | runtime/vm/verifier.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698