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

Unified Diff: lib/static_debug.dart

Issue 1016913002: pkg/smoke: support latest analyzer version and formatted code (Closed) Base URL: https://github.com/dart-lang/smoke@master
Patch Set: updates Created 5 years, 9 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
« no previous file with comments | « lib/static.dart ('k') | pubspec.yaml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/static_debug.dart
diff --git a/lib/static_debug.dart b/lib/static_debug.dart
index 3c4b9a6719e8c44c1b8059b9438c04499f757190..a51b13e289169ef67c91d0ce1497e4d9cbf9b914 100644
--- a/lib/static_debug.dart
+++ b/lib/static_debug.dart
@@ -31,17 +31,17 @@ class _DebugObjectAccessorService implements ObjectAccessorService {
: _static = new GeneratedObjectAccessorService(configuration),
_mirrors = new ReflectiveObjectAccessorService();
- read(Object object, Symbol name) =>
- _check('read', [object, name],
- _static.read(object, name),
- _mirrors.read(object, name));
+ read(Object object, Symbol name) => _check('read', [
+ object,
+ name
+ ], _static.read(object, name), _mirrors.read(object, name));
// Note: we can't verify operations with side-effects like write or invoke.
void write(Object object, Symbol name, value) =>
- _static.write(object, name, value);
+ _static.write(object, name, value);
invoke(object, Symbol name, List args, {Map namedArgs, bool adjust: false}) =>
- _static.invoke(object, name, args, namedArgs: namedArgs, adjust: adjust);
+ _static.invoke(object, name, args, namedArgs: namedArgs, adjust: adjust);
}
/// Implements [TypeInspectorService] using a static configuration.
@@ -53,40 +53,41 @@ class _DebugTypeInspectorService implements TypeInspectorService {
: _static = new GeneratedTypeInspectorService(configuration),
_mirrors = new ReflectiveTypeInspectorService();
- bool isSubclassOf(Type type, Type supertype) =>
- _check('isSubclassOf', [type, supertype],
- _static.isSubclassOf(type, supertype),
- _mirrors.isSubclassOf(type, supertype));
-
- bool hasGetter(Type type, Symbol name) =>
- _check('hasGetter', [type, name],
- _static.hasGetter(type, name),
- _mirrors.hasGetter(type, name));
-
- bool hasSetter(Type type, Symbol name) =>
- _check('hasSetter', [type, name],
- _static.hasSetter(type, name),
- _mirrors.hasSetter(type, name));
-
- bool hasInstanceMethod(Type type, Symbol name) =>
- _check('hasInstanceMethod', [type, name],
- _static.hasInstanceMethod(type, name),
- _mirrors.hasInstanceMethod(type, name));
-
- bool hasStaticMethod(Type type, Symbol name) =>
- _check('hasStaticMethod', [type, name],
- _static.hasStaticMethod(type, name),
- _mirrors.hasStaticMethod(type, name));
-
- Declaration getDeclaration(Type type, Symbol name) =>
- _check('getDeclaration', [type, name],
- _static.getDeclaration(type, name),
- _mirrors.getDeclaration(type, name));
-
- List<Declaration> query(Type type, QueryOptions options) =>
- _check('query', [type, options],
- _static.query(type, options),
- _mirrors.query(type, options));
+ bool isSubclassOf(Type type, Type supertype) => _check('isSubclassOf', [
+ type,
+ supertype
+ ], _static.isSubclassOf(type, supertype),
+ _mirrors.isSubclassOf(type, supertype));
+
+ bool hasGetter(Type type, Symbol name) => _check('hasGetter', [
+ type,
+ name
+ ], _static.hasGetter(type, name), _mirrors.hasGetter(type, name));
+
+ bool hasSetter(Type type, Symbol name) => _check('hasSetter', [
+ type,
+ name
+ ], _static.hasSetter(type, name), _mirrors.hasSetter(type, name));
+
+ bool hasInstanceMethod(Type type, Symbol name) => _check('hasInstanceMethod',
+ [type, name], _static.hasInstanceMethod(type, name),
+ _mirrors.hasInstanceMethod(type, name));
+
+ bool hasStaticMethod(Type type, Symbol name) => _check('hasStaticMethod', [
+ type,
+ name
+ ], _static.hasStaticMethod(type, name), _mirrors.hasStaticMethod(type, name));
+
+ Declaration getDeclaration(Type type, Symbol name) => _check('getDeclaration',
+ [
+ type,
+ name
+ ], _static.getDeclaration(type, name), _mirrors.getDeclaration(type, name));
+
+ List<Declaration> query(Type type, QueryOptions options) => _check('query', [
+ type,
+ options
+ ], _static.query(type, options), _mirrors.query(type, options));
}
/// Implements [SymbolConverterService] using a static configuration.
@@ -98,20 +99,17 @@ class _DebugSymbolConverterService implements SymbolConverterService {
: _static = new GeneratedSymbolConverterService(configuration),
_mirrors = new ReflectiveSymbolConverterService();
- String symbolToName(Symbol symbol) =>
- _check('symbolToName', [symbol],
- _static.symbolToName(symbol),
- _mirrors.symbolToName(symbol));
+ String symbolToName(Symbol symbol) => _check('symbolToName', [symbol],
+ _static.symbolToName(symbol), _mirrors.symbolToName(symbol));
- Symbol nameToSymbol(String name) =>
- _check('nameToSymbol', [name],
- _static.nameToSymbol(name),
- _mirrors.nameToSymbol(name));
+ Symbol nameToSymbol(String name) => _check('nameToSymbol', [name],
+ _static.nameToSymbol(name), _mirrors.nameToSymbol(name));
}
_check(String operation, List arguments, staticResult, mirrorResult) {
if (staticResult == mirrorResult) return staticResult;
- if (staticResult is List && mirrorResult is List &&
+ if (staticResult is List &&
+ mirrorResult is List &&
compareLists(staticResult, mirrorResult, unordered: true)) {
return staticResult;
}
« no previous file with comments | « lib/static.dart ('k') | pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698