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

Side by Side Diff: tests/compiler/dart2js/mirror_helper_test.dart

Issue 21339002: Rename MirrorSystem.getName calls in dart2dart. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 4 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
OLDNEW
(Empty)
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
3 // BSD-style license that can be found in the LICENSE file.
4
5 import "package:expect/expect.dart";
6
7 main() {
8
9 }
10
11
12
13 /*
14
15 IDEAS FOR TESTING RENAMING OF MIRROR CALLS
16
17 1) Rough skeleton:
18
19 Map<Element, ElementAst> elementAsts = partiallyCompile(<source>); (How can we d o this?)
20
21 Assert elementAsts is as expected
ahe 2013/07/31 13:16:28 Precisely what do you mean by "expected"?
zarah 2013/08/02 07:53:41 Added tests.
22
23 Map<Node, String> renames = new ...
24
25 Map<LibraryElement, String> imports = new ..
26
27 MirrorCollector collector = new MirrorCollector(renames, imports, compiler, elem entAsts);
28
29 for(Element e in elementAsts.keys) {
30 collector.collect(e);
31 }
32 Assert renames and imports have appropriate entries.
33
34
35 Do the above with sources affecting all paths in mirrorCollector
36
37 2) If the above not possible maybe manually construct the parts needed by mirror Collector,
38 and call its methods directly.
39
40 3) Later tests should test that the actual MirrorHelper library is called,
41 which should be doable by writing small test programs, compiling and running them.
42
43 4) Even later, the MirrorHelper library should also be testet on its own with
44 hand-written sample programs as they would come out of compiling.
45 */
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698