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

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

Issue 927563002: Fix hidden try tests. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 10 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 | « tests/try/poi/diff_test.dart ('k') | tests/try/poi/poi_find_test.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) 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 (one compilation unit per library). 5 // Test of LibraryUpdater (one compilation unit per library).
6 library trydart.library_updater_test; 6 library trydart.library_updater_test;
7 7
8 import 'package:dart2js_incremental/library_updater.dart' show 8 import 'package:dart2js_incremental/library_updater.dart' show
9 IncrementalCompilerContext, 9 IncrementalCompilerContext,
10 LibraryUpdater, 10 LibraryUpdater,
11 Update; 11 Update;
12 12
13 import 'package:compiler/src/dart2jslib.dart' show 13 import 'package:compiler/src/dart2jslib.dart' show
14 Script; 14 Script;
15 15
16 import 'package:compiler/src/io/source_file.dart' show 16 import 'package:compiler/src/io/source_file.dart' show
17 StringSourceFile; 17 StringSourceFile;
18 18
19 import 'compiler_test_case.dart'; 19 import 'compiler_test_case.dart';
20 20
21 void nolog(_) {} 21 void nolog(_) {}
22 22
23 Script newScriptFrom(LibraryElement library, String newSource) { 23 Script newScriptFrom(LibraryElement library, String newSource) {
24 Script script = library.entryCompilationUnit.script; 24 Script script = library.entryCompilationUnit.script;
25 return script.copyWithFile( 25 return script.copyWithFile(
26 new StringSourceFile(script.file.filename, newSource)); 26 new StringSourceFile.fromUri(script.file.uri, newSource));
27 } 27 }
28 28
29 class LibraryUpdaterTestCase extends CompilerTestCase { 29 class LibraryUpdaterTestCase extends CompilerTestCase {
30 final String newSource; 30 final String newSource;
31 31
32 final bool expectedCanReuse; 32 final bool expectedCanReuse;
33 33
34 final List<String> expectedUpdates; 34 final List<String> expectedUpdates;
35 35
36 LibraryUpdaterTestCase( 36 LibraryUpdaterTestCase(
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 new LibraryUpdaterTestCase( 131 new LibraryUpdaterTestCase(
132 before: 'main() => null;', 132 before: 'main() => null;',
133 after: 'main() {}', 133 after: 'main() {}',
134 canReuse: true, 134 canReuse: true,
135 updates: ['main']), 135 updates: ['main']),
136 136
137 // TODO(ahe): When supporting class members, test abstract methods. 137 // TODO(ahe): When supporting class members, test abstract methods.
138 ] 138 ]
139 ); 139 );
140 } 140 }
OLDNEW
« no previous file with comments | « tests/try/poi/diff_test.dart ('k') | tests/try/poi/poi_find_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698