Index: tests/lib_strong/mirrors/invoke_call_through_getter_previously_accessed_test.dart |
diff --git a/tests/lib_strong/mirrors/invoke_call_through_getter_previously_accessed_test.dart b/tests/lib_strong/mirrors/invoke_call_through_getter_previously_accessed_test.dart |
index 257660d98dbd530c1245b3ade141335ab69eeaea..594b16f5e2647d30db043161523c41cd3a1bc9e4 100644 |
--- a/tests/lib_strong/mirrors/invoke_call_through_getter_previously_accessed_test.dart |
+++ b/tests/lib_strong/mirrors/invoke_call_through_getter_previously_accessed_test.dart |
@@ -11,6 +11,7 @@ import 'package:expect/expect.dart'; |
class FakeFunctionCall { |
call(x, y) => '1 $x $y'; |
} |
+ |
class FakeFunctionNSM { |
noSuchMethod(msg) => msg.positionalArguments.join(', '); |
} |
@@ -43,22 +44,18 @@ testInstanceBase() { |
testInstanceReflective() { |
InstanceMirror im = reflect(new C()); |
- Expect.equals('1 5 6', |
- im.invoke(#fakeFunctionCall, [5, 6]).reflectee); |
- Expect.equals('7, 8', |
- im.invoke(#fakeFunctionNSM, [7, 8]).reflectee); |
- Expect.equals('2 C 9 10', |
- im.invoke(#closure, [9, 10]).reflectee); |
- Expect.equals('3 C 11 12 13 null', |
- im.invoke(#closureOpt, [11, 12, 13]).reflectee); |
+ Expect.equals('1 5 6', im.invoke(#fakeFunctionCall, [5, 6]).reflectee); |
+ Expect.equals('7, 8', im.invoke(#fakeFunctionNSM, [7, 8]).reflectee); |
+ Expect.equals('2 C 9 10', im.invoke(#closure, [9, 10]).reflectee); |
+ Expect.equals( |
+ '3 C 11 12 13 null', im.invoke(#closureOpt, [11, 12, 13]).reflectee); |
Expect.equals('4 C 14 15 null 16', // //# named: ok |
im.invoke(#closureNamed, [14, 15], {#w: 16}).reflectee); // //# named: continued |
- Expect.equals('DNU', |
- im.invoke(#doesNotExist, [17, 18]).reflectee); |
+ Expect.equals('DNU', im.invoke(#doesNotExist, [17, 18]).reflectee); |
Expect.throws(() => im.invoke(#closure, ['wrong arity']), |
- (e) => e is NoSuchMethodError); |
- Expect.throws(() => im.invoke(#notAClosure, []), |
- (e) => e is NoSuchMethodError); |
+ (e) => e is NoSuchMethodError); |
+ Expect.throws( |
+ () => im.invoke(#notAClosure, []), (e) => e is NoSuchMethodError); |
} |
class D { |
@@ -82,18 +79,15 @@ testClassBase() { |
testClassReflective() { |
ClassMirror cm = reflectClass(D); |
- Expect.equals('1 5 6', |
- cm.invoke(#fakeFunctionCall, [5, 6]).reflectee); |
- Expect.equals('7, 8', |
- cm.invoke(#fakeFunctionNSM, [7, 8]).reflectee); |
- Expect.equals('2 9 10', |
- cm.invoke(#closure, [9, 10]).reflectee); |
- Expect.equals('3 11 12 13 null', |
- cm.invoke(#closureOpt, [11, 12, 13]).reflectee); |
+ Expect.equals('1 5 6', cm.invoke(#fakeFunctionCall, [5, 6]).reflectee); |
+ Expect.equals('7, 8', cm.invoke(#fakeFunctionNSM, [7, 8]).reflectee); |
+ Expect.equals('2 9 10', cm.invoke(#closure, [9, 10]).reflectee); |
+ Expect.equals( |
+ '3 11 12 13 null', cm.invoke(#closureOpt, [11, 12, 13]).reflectee); |
Expect.equals('4 14 15 null 16', // //# named: continued |
cm.invoke(#closureNamed, [14, 15], {#w: 16}).reflectee); // //# named: continued |
Expect.throws(() => cm.invoke(#closure, ['wrong arity']), |
- (e) => e is NoSuchMethodError); |
+ (e) => e is NoSuchMethodError); |
} |
get fakeFunctionCall => new FakeFunctionCall(); |
@@ -115,18 +109,15 @@ testLibraryBase() { |
testLibraryReflective() { |
LibraryMirror lm = reflectClass(D).owner; |
- Expect.equals('1 5 6', |
- lm.invoke(#fakeFunctionCall, [5, 6]).reflectee); |
- Expect.equals('7, 8', |
- lm.invoke(#fakeFunctionNSM, [7, 8]).reflectee); |
- Expect.equals('2 9 10', |
- lm.invoke(#closure, [9, 10]).reflectee); |
- Expect.equals('3 11 12 13 null', |
- lm.invoke(#closureOpt, [11, 12, 13]).reflectee); |
+ Expect.equals('1 5 6', lm.invoke(#fakeFunctionCall, [5, 6]).reflectee); |
+ Expect.equals('7, 8', lm.invoke(#fakeFunctionNSM, [7, 8]).reflectee); |
+ Expect.equals('2 9 10', lm.invoke(#closure, [9, 10]).reflectee); |
+ Expect.equals( |
+ '3 11 12 13 null', lm.invoke(#closureOpt, [11, 12, 13]).reflectee); |
Expect.equals('4 14 15 null 16', // //# named: continued |
lm.invoke(#closureNamed, [14, 15], {#w: 16}).reflectee); // //# named: continued |
Expect.throws(() => lm.invoke(#closure, ['wrong arity']), |
- (e) => e is NoSuchMethodError); |
+ (e) => e is NoSuchMethodError); |
} |
main() { |