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

Unified Diff: tests/lib/mirrors/fake_function_with_call_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/fake_function_with_call_test.dart
diff --git a/tests/lib/mirrors/fake_function_with_call_test.dart b/tests/lib/mirrors/fake_function_with_call_test.dart
index fb0a83166b0f596595c0ff80b9744ee78144a415..d5aa2566bcc06197b09f4681aa41c37111598ac1 100644
--- a/tests/lib/mirrors/fake_function_with_call_test.dart
+++ b/tests/lib/mirrors/fake_function_with_call_test.dart
@@ -11,9 +11,9 @@ import "package:expect/expect.dart";
membersOf(ClassMirror cm) {
var result = new Map();
- cm.declarations.forEach((k,v) {
- if(v is MethodMirror && !v.isConstructor) result[k] = v;
- if(v is VariableMirror) result[k] = v;
+ cm.declarations.forEach((k, v) {
+ if (v is MethodMirror && !v.isConstructor) result[k] = v;
+ if (v is VariableMirror) result[k] = v;
});
return result;
}
@@ -27,18 +27,15 @@ main() {
Expect.isTrue(new WannabeFunction() is Function);
ClosureMirror cm = reflect(new WannabeFunction());
- Expect.equals(7, cm.invoke(#call, [3,4]).reflectee);
- Expect.throws(() => cm.invoke(#call, [3]),
- (e) => e is NoSuchMethodError,
- "Wrong arity");
+ Expect.equals(7, cm.invoke(#call, [3, 4]).reflectee);
+ Expect.throws(() => cm.invoke(#call, [3]), (e) => e is NoSuchMethodError,
+ "Wrong arity");
Expect.equals(49, cm.invoke(#method, [7]).reflectee);
- Expect.throws(() => cm.invoke(#method, [3, 4]),
- (e) => e is NoSuchMethodError,
- "Wrong arity");
- Expect.equals(7, cm.apply([3,4]).reflectee);
- Expect.throws(() => cm.apply([3]),
- (e) => e is NoSuchMethodError,
- "Wrong arity");
+ Expect.throws(() => cm.invoke(#method, [3, 4]), (e) => e is NoSuchMethodError,
+ "Wrong arity");
+ Expect.equals(7, cm.apply([3, 4]).reflectee);
+ Expect.throws(
+ () => cm.apply([3]), (e) => e is NoSuchMethodError, "Wrong arity");
MethodMirror mm = cm.function;
Expect.equals(#call, mm.simpleName);

Powered by Google App Engine
This is Rietveld 408576698