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

Unified Diff: dart/tests/utils/dummy_compiler_test.dart

Issue 17588005: Warn about overriding operator== but not hashCode. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Update comments (according to my dictionary whitelist is a word). Created 7 years, 6 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: dart/tests/utils/dummy_compiler_test.dart
diff --git a/dart/tests/utils/dummy_compiler_test.dart b/dart/tests/utils/dummy_compiler_test.dart
index 7f80c396ccfb193dbba080f679adf4621e1aca00..74df9b26f165dac461c71d672153d92dacdc230e 100644
--- a/dart/tests/utils/dummy_compiler_test.dart
+++ b/dart/tests/utils/dummy_compiler_test.dart
@@ -17,61 +17,65 @@ Future<String> provider(Uri uri) {
source = "main() {}";
} else if (uri.scheme == "lib") {
if (uri.path.endsWith("/core.dart")) {
- source = """library core;
- class Object {
- operator==(other) {}
- }
- class Type {}
- class bool {}
- class num {}
- class int {}
- class double{}
- class String{}
- class Function{}
- class List {}
- class Map {}
- class Closure {}
- class BoundClosure {}
- class Dynamic_ {}
- class Null {}
- class StackTrace {}
- class LinkedHashMap {}
- identical(a, b) => true;
- getRuntimeTypeInfo(o) {}
- setRuntimeTypeInfo(o, i) {}
- eqNull(a) {}
- eqNullB(a) {}""";
+ source = """
+library core;
+class Object {
+ operator==(other) {}
+ get hashCode => throw 'Object.hashCode not implemented.';
+}
+class Type {}
+class bool {}
+class num {}
+class int {}
+class double{}
+class String{}
+class Function{}
+class List {}
+class Map {}
+class Closure {}
+class BoundClosure {}
+class Dynamic_ {}
+class Null {}
+class StackTrace {}
+class LinkedHashMap {}
+identical(a, b) => true;
+getRuntimeTypeInfo(o) {}
+setRuntimeTypeInfo(o, i) {}
+eqNull(a) {}
+eqNullB(a) {}""";
} else if (uri.path.endsWith('_patch.dart')) {
source = '';
} else if (uri.path.endsWith('interceptors.dart')) {
- source = """class Interceptor {
- operator==(other) {}
- }
- class JSIndexable {
- get length;
- }
- class JSMutableIndexable {}
- class JSArray implements JSIndexable {
- var removeLast;
- var add;
- }
- class JSMutableArray extends JSArray {}
- class JSFixedArray extends JSMutableArray {}
- class JSExtendableArray extends JSMutableArray {}
- class JSString implements JSIndexable {
- var split;
- var concat;
- var toString;
- }
- class JSFunction {}
- class JSInt {}
- class JSDouble {}
- class JSNumber {}
- class JSNull {}
- class JSBool {}
- getInterceptor(o){}
- getDispatchProperty(o) {}
- setDispatchProperty(o, v) {}""";
+ source = """
+class Interceptor {
+ operator==(other) {}
+ get hashCode => throw 'Interceptor.hashCode not implemented.';
+}
+class JSIndexable {
+ get length;
+}
+class JSMutableIndexable {}
+class JSArray implements JSIndexable {
+ var removeLast;
+ var add;
+}
+class JSMutableArray extends JSArray {}
+class JSFixedArray extends JSMutableArray {}
+class JSExtendableArray extends JSMutableArray {}
+class JSString implements JSIndexable {
+ var split;
+ var concat;
+ var toString;
+}
+class JSFunction {}
+class JSInt {}
+class JSDouble {}
+class JSNumber {}
+class JSNull {}
+class JSBool {}
+getInterceptor(o){}
+getDispatchProperty(o) {}
+setDispatchProperty(o, v) {}""";
} else if (uri.path.endsWith('js_helper.dart')) {
source = 'library jshelper; class JSInvocationMirror {} '
'class ConstantMap {} class TypeImpl {}';

Powered by Google App Engine
This is Rietveld 408576698