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

Unified Diff: tests/lib_strong/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_strong/mirrors/fake_function_with_call_test.dart
diff --git a/tests/lib_strong/mirrors/fake_function_with_call_test.dart b/tests/lib_strong/mirrors/fake_function_with_call_test.dart
index 05523ef8be736a3222df2557f31b3509114fb6a4..b77eb59e5e1310d02b1df2392d2417d7bc68085a 100644
--- a/tests/lib_strong/mirrors/fake_function_with_call_test.dart
+++ b/tests/lib_strong/mirrors/fake_function_with_call_test.dart
@@ -8,9 +8,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;
}
@@ -24,18 +24,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