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

Issue 11269041: Added test for the behavior of InvocationMirror and noSuchMethod. (Closed)

Created:
8 years, 1 month ago by Lasse Reichstein Nielsen
Modified:
8 years, 1 month ago
Reviewers:
Mads Ager (google)
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Added test for the behavior of InvocationMirror and noSuchMethod. No implementation currently satisfy the test - it's created as a goal for the implementations. R=ager@google.com Committed: https://code.google.com/p/dart/source/detail?r=14125

Patch Set 1 #

Patch Set 2 : NoSuchMethodError doesn't have a name property. #

Patch Set 3 : Oh, and just one more thing. #

Total comments: 16

Patch Set 4 : Addressed review comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+178 lines, -1 line) Patch
A tests/language/invocation_mirror_test.dart View 1 2 3 1 chunk +166 lines, -0 lines 0 comments Download
M tests/language/language.status View 1 2 3 4 chunks +9 lines, -1 line 0 comments Download
M tests/language/language_dart2js.status View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Lasse Reichstein Nielsen
PTAL.
8 years, 1 month ago (2012-10-25 11:54:35 UTC) #1
Mads Ager (google)
LGTM with nits. https://codereview.chromium.org/11269041/diff/5001/tests/language/invocation_mirror_test.dart File tests/language/invocation_mirror_test.dart (right): https://codereview.chromium.org/11269041/diff/5001/tests/language/invocation_mirror_test.dart#newcode32 tests/language/invocation_mirror_test.dart:32: testIM(InvocationMirror im, String name, [List positional, ...
8 years, 1 month ago (2012-10-25 12:32:19 UTC) #2
Lasse Reichstein Nielsen
8 years, 1 month ago (2012-10-25 14:12:00 UTC) #3
https://codereview.chromium.org/11269041/diff/5001/tests/language/invocation_...
File tests/language/invocation_mirror_test.dart (right):

https://codereview.chromium.org/11269041/diff/5001/tests/language/invocation_...
tests/language/invocation_mirror_test.dart:32: testIM(InvocationMirror im,
String name, [List positional, Map named]) {
On 2012/10/25 12:32:19, Mads Ager wrote:
> Write it out: testInvocationMirror?

Done.

https://codereview.chromium.org/11269041/diff/5001/tests/language/invocation_...
tests/language/invocation_mirror_test.dart:62: named.forEach((k,v) {u
On 2012/10/25 12:32:19, Mads Ager wrote:
> Could you add a space? (k, v) {
> 
> Also, the 'u' is a typo.

Done.

https://codereview.chromium.org/11269041/diff/5001/tests/language/invocation_...
tests/language/invocation_mirror_test.dart:68: isNSM(e) => e is
noSuchMethodError;
That would be almost as long as the body, so I inlined it instead.

https://codereview.chromium.org/11269041/diff/5001/tests/language/invocation_...
tests/language/invocation_mirror_test.dart:139: Expect.throws(() { var x =
n.flif; x(37,42); }, isNSM);
On 2012/10/25 12:32:19, Mads Ager wrote:
> Add space x(37, 42)?

Done.

https://codereview.chromium.org/11269041/diff/5001/tests/language/invocation_...
tests/language/invocation_mirror_test.dart:140: Expect.throws(() { var x =
c.call; x(37,42); }, isNSM);
On 2012/10/25 12:32:19, Mads Ager wrote:
> ditto

Done.

https://codereview.chromium.org/11269041/diff/5001/tests/language/language.st...
File tests/language/language.status (right):

https://codereview.chromium.org/11269041/diff/5001/tests/language/language.st...
tests/language/language.status:205: # Test expects signature of noSUchMethod to
be
On 2012/10/25 12:32:19, Mads Ager wrote:
> typo
> 
> Also, please finish comment.

Done.

https://codereview.chromium.org/11269041/diff/5001/tests/language/language.st...
tests/language/language.status:447: # Implement InvocationMirror and pass it to
noSuchMethod. This error might go
Good solution!

https://codereview.chromium.org/11269041/diff/5001/tests/language/language_da...
File tests/language/language_dart2js.status (right):

https://codereview.chromium.org/11269041/diff/5001/tests/language/language_da...
tests/language/language_dart2js.status:318: invocation_mirror_test: Fail #
Implement InvocationMirror and pass it to noSuchMethod.
On 2012/10/25 12:32:19, Mads Ager wrote:
> Move comment to line before?

Done.

Powered by Google App Engine
This is Rietveld 408576698