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

Unified Diff: pkg/analyzer/test/src/util/fast_uri_test.dart

Issue 2004793002: Fix for FastUri.hashCode and hasAuthorizy (to fix ==). (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: tweak Created 4 years, 7 months 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
Index: pkg/analyzer/test/src/util/fast_uri_test.dart
diff --git a/pkg/analyzer/test/src/util/fast_uri_test.dart b/pkg/analyzer/test/src/util/fast_uri_test.dart
index 487528eb6c3ae72e0164e8bbe8d5feb5b6fb3bb8..060904ee943435539641f3289ddf697093a05424 100644
--- a/pkg/analyzer/test/src/util/fast_uri_test.dart
+++ b/pkg/analyzer/test/src/util/fast_uri_test.dart
@@ -35,7 +35,12 @@ class _FastUriTest {
_compareTextWithCoreUri('package:analyzer/src/util/fast_uri.dart');
}
- void test_parse_notFast() {
+ void test_parse_notFast_hasAuthority() {
+ Uri uri = FastUri.parse('http://www.google.com/pages/about.html');
+ expect(uri, isNot(isFastUri));
+ }
+
+ void test_parse_notFast_hasPort() {
Uri uri = FastUri.parse('http://www.google.com:8080/pages/about.html');
expect(uri, isNot(isFastUri));
}
@@ -137,7 +142,8 @@ class _FastUriTest {
expect(fastUri.data, coreUri.data);
expect(fastUri.fragment, coreUri.fragment);
expect(fastUri.hasAbsolutePath, coreUri.hasAbsolutePath);
- expect(fastUri.hasAuthority, coreUri.hasEmptyPath);
+ expect(fastUri.hasAuthority, coreUri.hasAuthority);
+ expect(fastUri.hasEmptyPath, coreUri.hasEmptyPath);
expect(fastUri.hasFragment, coreUri.hasFragment);
expect(fastUri.hasPort, coreUri.hasPort);
expect(fastUri.hasQuery, coreUri.hasQuery);
@@ -155,5 +161,9 @@ class _FastUriTest {
expect(fastUri.queryParametersAll, coreUri.queryParametersAll);
expect(fastUri.scheme, coreUri.scheme);
expect(fastUri.userInfo, coreUri.userInfo);
+ // Object
+ expect(fastUri.hashCode, coreUri.hashCode);
+ expect(fastUri == coreUri, isTrue);
+ expect(coreUri == fastUri, isTrue);
}
}
« pkg/analyzer/lib/src/util/fast_uri.dart ('K') | « pkg/analyzer/lib/src/util/fast_uri.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698