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

Unified Diff: pkg/analyzer_experimental/test/generated/element_test.dart

Issue 22285004: New analyzer_experimental snapshot. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 4 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_experimental/test/generated/element_test.dart
diff --git a/pkg/analyzer_experimental/test/generated/element_test.dart b/pkg/analyzer_experimental/test/generated/element_test.dart
index 23b15b9ee638ff3a9a60fa38d2fcd0468dccbbab..c5d24f1d1cac6709d98d9d307731216c163b23ee 100644
--- a/pkg/analyzer_experimental/test/generated/element_test.dart
+++ b/pkg/analyzer_experimental/test/generated/element_test.dart
@@ -64,6 +64,17 @@ class ElementLocationImplTest extends EngineTestCase {
ElementLocationImpl location = new ElementLocationImpl.con2(encoding);
JUnitTestCase.assertEquals(encoding, location.encoding);
}
+ void test_hashCode_equal() {
+ String encoding = "a;b;c";
+ ElementLocationImpl first = new ElementLocationImpl.con2(encoding);
+ ElementLocationImpl second = new ElementLocationImpl.con2(encoding);
+ JUnitTestCase.assertTrue(first.hashCode == second.hashCode);
+ }
+ void test_hashCode_equalWithDifferentUriKind() {
+ ElementLocationImpl first = new ElementLocationImpl.con2("fa;fb;c");
+ ElementLocationImpl second = new ElementLocationImpl.con2("pa;pb;c");
+ JUnitTestCase.assertTrue(first.hashCode == second.hashCode);
+ }
static dartSuite() {
_ut.group('ElementLocationImplTest', () {
_ut.test('test_create_encoding', () {
@@ -98,6 +109,14 @@ class ElementLocationImplTest extends EngineTestCase {
final __test = new ElementLocationImplTest();
runJUnitTest(__test, __test.test_getEncoding);
});
+ _ut.test('test_hashCode_equal', () {
+ final __test = new ElementLocationImplTest();
+ runJUnitTest(__test, __test.test_hashCode_equal);
+ });
+ _ut.test('test_hashCode_equalWithDifferentUriKind', () {
+ final __test = new ElementLocationImplTest();
+ runJUnitTest(__test, __test.test_hashCode_equalWithDifferentUriKind);
+ });
});
}
}
@@ -2339,7 +2358,7 @@ class FunctionTypeImplTest extends EngineTestCase {
}
void test_isSubtypeOf_baseCase_classFunction() {
ClassElementImpl functionElement = ElementFactory.classElement2("Function", []);
- InterfaceTypeImpl functionType = new InterfaceTypeImpl_20(functionElement);
+ InterfaceTypeImpl functionType = new InterfaceTypeImpl_21(functionElement);
FunctionType f = ElementFactory.functionElement("f").type;
JUnitTestCase.assertTrue(f.isSubtypeOf(functionType));
}
@@ -2799,8 +2818,8 @@ class FunctionTypeImplTest extends EngineTestCase {
});
}
}
-class InterfaceTypeImpl_20 extends InterfaceTypeImpl {
- InterfaceTypeImpl_20(ClassElement arg0) : super.con1(arg0);
+class InterfaceTypeImpl_21 extends InterfaceTypeImpl {
+ InterfaceTypeImpl_21(ClassElement arg0) : super.con1(arg0);
bool get isDartCoreFunction => true;
}
main() {

Powered by Google App Engine
This is Rietveld 408576698