| OLD | NEW |
| 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2017, 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 /// Integration test that runs the incremental compiler, runs the compiled | 5 /// Integration test that runs the incremental compiler, runs the compiled |
| 6 /// program, incrementally rebuild portions of the app, and triggers a hot | 6 /// program, incrementally rebuild portions of the app, and triggers a hot |
| 7 /// reload on the running program. | 7 /// reload on the running program. |
| 8 library front_end.incremental.hot_reload_e2e_test; | 8 library front_end.incremental.hot_reload_e2e_test; |
| 9 | 9 |
| 10 import 'dart:async'; | 10 import 'dart:async'; |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 return true; | 190 return true; |
| 191 } | 191 } |
| 192 return false; | 192 return false; |
| 193 } | 193 } |
| 194 | 194 |
| 195 Future<Null> writeProgram(Program program, Uri outputUri) async { | 195 Future<Null> writeProgram(Program program, Uri outputUri) async { |
| 196 var sink = new File.fromUri(outputUri).openWrite(); | 196 var sink = new File.fromUri(outputUri).openWrite(); |
| 197 // TODO(sigmund): the incremental generator should always filter these | 197 // TODO(sigmund): the incremental generator should always filter these |
| 198 // libraries instead. | 198 // libraries instead. |
| 199 new LimitedBinaryPrinter( | 199 new LimitedBinaryPrinter( |
| 200 sink, (library) => library.importUri.scheme != 'dart') | 200 sink, (library) => library.importUri.scheme != 'dart', false) |
| 201 .writeProgramFile(program); | 201 .writeProgramFile(program); |
| 202 await sink.close(); | 202 await sink.close(); |
| 203 } | 203 } |
| 204 | 204 |
| 205 void writeFile(MemoryFileSystem fs, String fileName, String contents) { | 205 void writeFile(MemoryFileSystem fs, String fileName, String contents) { |
| 206 fs.entityForUri(Uri.parse('file:///$fileName')).writeAsStringSync(contents); | 206 fs.entityForUri(Uri.parse('file:///$fileName')).writeAsStringSync(contents); |
| 207 } | 207 } |
| 208 | 208 |
| 209 /// This program calls a function periodically and tracks when the function | 209 /// This program calls a function periodically and tracks when the function |
| 210 /// returns a different value than before (which only happens after a | 210 /// returns a different value than before (which only happens after a |
| (...skipping 26 matching lines...) Expand all Loading... |
| 237 | 237 |
| 238 f() => "$line part2"; | 238 f() => "$line part2"; |
| 239 '''; | 239 '''; |
| 240 | 240 |
| 241 const sourceB = r''' | 241 const sourceB = r''' |
| 242 get line => "part1"; | 242 get line => "part1"; |
| 243 '''; | 243 '''; |
| 244 | 244 |
| 245 RegExp observatoryPortRegExp = | 245 RegExp observatoryPortRegExp = |
| 246 new RegExp("Observatory listening on http://127.0.0.1:\([0-9]*\)/"); | 246 new RegExp("Observatory listening on http://127.0.0.1:\([0-9]*\)/"); |
| OLD | NEW |