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

Side by Side Diff: dart/tests/lib/mirrors/constructors_test.dart

Issue 18216002: Implement JsMethodMirror.constructorName. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address comments Created 7 years, 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « dart/sdk/lib/_internal/lib/js_mirrors.dart ('k') | dart/tests/lib/mirrors/stringify.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library test.constructors_test; 5 library test.constructors_test;
6 6
7 import 'dart:mirrors'; 7 import 'dart:mirrors';
8 8
9 import 'package:expect/expect.dart'; 9 import 'package:expect/expect.dart';
10 10
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 ' Biz.named: Method(s(Biz.named) in s(Biz), constructor)}', 45 ' Biz.named: Method(s(Biz.named) in s(Biz), constructor)}',
46 bizConstructors); 46 bizConstructors);
47 print(bizConstructors); 47 print(bizConstructors);
48 48
49 expect('[]', fooConstructors.values.single.parameters); 49 expect('[]', fooConstructors.values.single.parameters);
50 expect('[]', barConstructors.values.single.parameters); 50 expect('[]', barConstructors.values.single.parameters);
51 expect('[]', bazConstructors.values.single.parameters); 51 expect('[]', bazConstructors.values.single.parameters);
52 for (var constructor in bizConstructors.values) { 52 for (var constructor in bizConstructors.values) {
53 expect('[]', constructor.parameters); 53 expect('[]', constructor.parameters);
54 } 54 }
55
56 expect('[s()]',
57 fooConstructors.values.map((m) => m.constructorName).toList());
58 expect('[s()]',
59 barConstructors.values.map((m) => m.constructorName).toList());
60 expect('[s(named)]',
61 bazConstructors.values.map((m) => m.constructorName).toList());
62 expect('[s(), s(named)]',
63 bizConstructors.values.map((m) => m.constructorName).toList()
64 ..sort(compareSymbols));
55 } 65 }
OLDNEW
« no previous file with comments | « dart/sdk/lib/_internal/lib/js_mirrors.dart ('k') | dart/tests/lib/mirrors/stringify.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698