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

Side by Side Diff: dart/tests/try/poi/library_updater_test.dart

Issue 757043002: Various clean up. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years 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
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 // Test of LibraryUpdater. 5 // Test of LibraryUpdater.
6 library trydart.library_updater_test; 6 library trydart.library_updater_test;
7 7
8 import 'dart:convert' show 8 import 'dart:convert' show
9 UTF8; 9 UTF8;
10 10
(...skipping 15 matching lines...) Expand all
26 LibraryUpdaterTestCase( 26 LibraryUpdaterTestCase(
27 {String before, 27 {String before,
28 String after, 28 String after,
29 bool canReuse, 29 bool canReuse,
30 List<String> updates}) 30 List<String> updates})
31 : this.newSource = after, 31 : this.newSource = after,
32 this.expectedCanReuse = canReuse, 32 this.expectedCanReuse = canReuse,
33 this.expectedUpdates = updates, 33 this.expectedUpdates = updates,
34 super(before); 34 super(before);
35 35
36 Future run() => mainApp.then((LibraryElement library) { 36 Future run() => loadMainApp().then((LibraryElement library) {
37 LibraryUpdater updater = 37 LibraryUpdater updater =
38 new LibraryUpdater(this.compiler, null, scriptUri, nolog, nolog); 38 new LibraryUpdater(this.compiler, null, scriptUri, nolog, nolog);
39 bool actualCanReuse = 39 bool actualCanReuse =
40 updater.canReuseLibrary(library, UTF8.encode(newSource)); 40 updater.canReuseLibrary(library, UTF8.encode(newSource));
41 Expect.equals(expectedCanReuse, actualCanReuse); 41 Expect.equals(expectedCanReuse, actualCanReuse);
42 42
43 Expect.setEquals( 43 Expect.setEquals(
44 expectedUpdates.toSet(), 44 expectedUpdates.toSet(),
45 updater.updates.map(nameOfUpdate).toSet()); 45 updater.updates.map(nameOfUpdate).toSet());
46 }); 46 });
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 new LibraryUpdaterTestCase( 118 new LibraryUpdaterTestCase(
119 before: 'main() => null;', 119 before: 'main() => null;',
120 after: 'main() {}', 120 after: 'main() {}',
121 canReuse: true, 121 canReuse: true,
122 updates: ['main']), 122 updates: ['main']),
123 123
124 // TODO(ahe): When supporting class members, test abstract methods. 124 // TODO(ahe): When supporting class members, test abstract methods.
125 ] 125 ]
126 ); 126 );
127 } 127 }
OLDNEW
« no previous file with comments | « dart/tests/try/poi/compiler_test_case.dart ('k') | dart/tests/try/poi/qualified_names_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698