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

Unified Diff: tests/lib/mirrors/reflect_model_test.dart

Issue 2771453003: Format all tests. (Closed)
Patch Set: Format files Created 3 years, 8 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: tests/lib/mirrors/reflect_model_test.dart
diff --git a/tests/lib/mirrors/reflect_model_test.dart b/tests/lib/mirrors/reflect_model_test.dart
index fa1e4f06506e8b676be8cd6395009bf8bc5de659..ee6cf8b6b97ee23f0e5cd76c89ffa4adcc51d490 100644
--- a/tests/lib/mirrors/reflect_model_test.dart
+++ b/tests/lib/mirrors/reflect_model_test.dart
@@ -16,7 +16,7 @@ isNoSuchMethodError(e) => e is NoSuchMethodError;
variablesOf(ClassMirror cm) {
var result = new Map();
- cm.declarations.forEach((k,v) {
+ cm.declarations.forEach((k, v) {
if (v is VariableMirror) result[k] = v;
});
return result;
@@ -24,7 +24,7 @@ variablesOf(ClassMirror cm) {
gettersOf(ClassMirror cm) {
var result = new Map();
- cm.declarations.forEach((k,v) {
+ cm.declarations.forEach((k, v) {
if (v is MethodMirror && v.isGetter) result[k] = v;
});
return result;
@@ -32,7 +32,7 @@ gettersOf(ClassMirror cm) {
settersOf(ClassMirror cm) {
var result = new Map();
- cm.declarations.forEach((k,v) {
+ cm.declarations.forEach((k, v) {
if (v is MethodMirror && v.isSetter) result[k] = v;
});
return result;
@@ -40,7 +40,7 @@ settersOf(ClassMirror cm) {
methodsOf(ClassMirror cm) {
var result = new Map();
- cm.declarations.forEach((k,v) {
+ cm.declarations.forEach((k, v) {
if (v is MethodMirror && v.isRegularMethod) result[k] = v;
});
return result;
@@ -79,23 +79,26 @@ main() {
Expect.equals('B:get field', c.getField(field).reflectee);
Expect.equals(89, fieldC);
- expect('{accessor: Method(s(accessor) in s(A), getter)'
- '}',
- gettersOf(aClass));
- expect('{accessor: Method(s(accessor) in s(B), getter)'
- ', field: Method(s(field) in s(B), getter)}',
- gettersOf(bClass));
- expect('{accessor: Method(s(accessor) in s(C), getter)}',
- gettersOf(cClass));
-
- expect('{accessor=: Method(s(accessor=) in s(A), setter)'
- '}',
- settersOf(aClass));
- expect('{accessor=: Method(s(accessor=) in s(B), setter)}',
- settersOf(bClass));
- expect('{accessor=: Method(s(accessor=) in s(C), setter)'
- ', field=: Method(s(field=) in s(C), setter)}',
- settersOf(cClass));
+ expect(
+ '{accessor: Method(s(accessor) in s(A), getter)'
+ '}',
+ gettersOf(aClass));
+ expect(
+ '{accessor: Method(s(accessor) in s(B), getter)'
+ ', field: Method(s(field) in s(B), getter)}',
+ gettersOf(bClass));
+ expect('{accessor: Method(s(accessor) in s(C), getter)}', gettersOf(cClass));
+
+ expect(
+ '{accessor=: Method(s(accessor=) in s(A), setter)'
+ '}',
+ settersOf(aClass));
+ expect(
+ '{accessor=: Method(s(accessor=) in s(B), setter)}', settersOf(bClass));
+ expect(
+ '{accessor=: Method(s(accessor=) in s(C), setter)'
+ ', field=: Method(s(field=) in s(C), setter)}',
+ settersOf(cClass));
Expect.equals('A:instanceMethod(7)', a.invoke(instanceMethod, [7]).reflectee);
Expect.equals('B:instanceMethod(9)', b.invoke(instanceMethod, [9]).reflectee);
@@ -132,11 +135,17 @@ main() {
Expect.equals('aMethod', b.invoke(aMethod, []).reflectee);
Expect.equals('aMethod', c.invoke(aMethod, []).reflectee);
- Expect.throws(() { a.invoke(bMethod, []); }, isNoSuchMethodError);
+ Expect.throws(() {
+ a.invoke(bMethod, []);
+ }, isNoSuchMethodError);
Expect.equals('bMethod', b.invoke(bMethod, []).reflectee);
Expect.equals('bMethod', c.invoke(bMethod, []).reflectee);
- Expect.throws(() { a.invoke(cMethod, []); }, isNoSuchMethodError);
- Expect.throws(() { b.invoke(cMethod, []); }, isNoSuchMethodError);
+ Expect.throws(() {
+ a.invoke(cMethod, []);
+ }, isNoSuchMethodError);
+ Expect.throws(() {
+ b.invoke(cMethod, []);
+ }, isNoSuchMethodError);
Expect.equals('cMethod', c.invoke(cMethod, []).reflectee);
}

Powered by Google App Engine
This is Rietveld 408576698