Chromium Code Reviews| Index: tests/language/invocation_mirror_test.dart |
| =================================================================== |
| --- tests/language/invocation_mirror_test.dart (revision 16462) |
| +++ tests/language/invocation_mirror_test.dart (working copy) |
| @@ -41,8 +41,8 @@ |
| if (positional == null) { |
| Expect.isTrue(im.isGetter, "$name:isGetter"); |
| Expect.isFalse(im.isSetter, "$name:isSetter"); |
| - Expect.equals(null, im.positionalArguments, "$name:positional"); |
| - Expect.equals(null, im.namedArguments, "$name:named"); |
| + Expect.equals(0, im.positionalArguments.length, "$name:#positional"); |
| + Expect.equals(0, im.namedArguments.length, "$name:#named"); |
|
Lasse Reichstein Nielsen
2013/01/02 09:59:29
This change is incorrect.
The API specification fo
regis
2013/01/02 17:37:21
The Language Spec has refined the description of t
|
| return; |
| } |
| Expect.isTrue(im.isSetter, "$name:isSetter"); |
| @@ -50,7 +50,7 @@ |
| Expect.equals(1, im.positionalArguments.length, "$name:#positional"); |
| Expect.equals(positional[0], im.positionalArguments[0], |
| "$name:positional[0]"); |
| - Expect.equals(null, im.namedArguments, "$name:named"); |
| + Expect.equals(0, im.namedArguments.length, "$name:#named"); |
| return; |
| } |
| Expect.isTrue(im.isMethod, "$name:isMethod"); |
| @@ -166,7 +166,7 @@ |
| testInvocationMirror(super - 4, '-', [4], {}); |
| testInvocationMirror(-super, 'unary-', [], {}); |
| testInvocationMirror(super[42], '[]', [42], {}); |
| - testInvocationMirror((super[37] = 42).last, '[]=', [37, 42], {}); |
| + testInvocationMirror((){super[37] = 42; return last;}(), '[]=', [37, 42], {}); |
| // Wrong arguments to existing function. |
| testInvocationMirror(super.flif(), "flif", [], {}); |
| @@ -234,7 +234,7 @@ |
| test(() => o.toString(x: 37)); |
| test(() => o.hashCode = 42); |
| test(() => o.hashCode()); // Thrown by int.noSuchMethod. |
| - test(n.flif); // Extracted method has no noSuchMethod. |
| + test(() => (n.flif)()); // Extracted method has no noSuchMethod. |
| } |
| main() { |