| OLD | NEW |
| 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 a sequence of modifications to hello-world which used to cause problems | 5 // Test a sequence of modifications to hello-world which used to cause problems |
| 6 // on Try Dart. | 6 // on Try Dart. |
| 7 | 7 |
| 8 import 'dart:io' show | 8 import 'dart:io' show |
| 9 Platform; | 9 Platform; |
| 10 | 10 |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 var testResults = { | 78 var testResults = { |
| 79 '/test1.dart': true, | 79 '/test1.dart': true, |
| 80 '/test2.dart': true, | 80 '/test2.dart': true, |
| 81 '/test3.dart': false, | 81 '/test3.dart': false, |
| 82 '/test4.dart': false, | 82 '/test4.dart': false, |
| 83 '/test5.dart': true, | 83 '/test5.dart': true, |
| 84 }; | 84 }; |
| 85 | 85 |
| 86 main() { | 86 main() { |
| 87 Uri libraryRoot = Uri.base.resolve('sdk/'); | 87 Uri libraryRoot = Uri.base.resolve('sdk/'); |
| 88 Uri packageRoot = Uri.base.resolveUri( | 88 Uri packageRoot = Uri.base.resolve(Platform.packageRoot); |
| 89 new Uri.file('${Platform.packageRoot}/')); | |
| 90 MemorySourceFileProvider provider = | 89 MemorySourceFileProvider provider = |
| 91 new MemorySourceFileProvider(tests); | 90 new MemorySourceFileProvider(tests); |
| 92 asyncTest(() => runTests(libraryRoot, packageRoot, provider)); | 91 asyncTest(() => runTests(libraryRoot, packageRoot, provider)); |
| 93 } | 92 } |
| 94 | 93 |
| 95 Future runTests( | 94 Future runTests( |
| 96 Uri libraryRoot, | 95 Uri libraryRoot, |
| 97 Uri packageRoot, | 96 Uri packageRoot, |
| 98 MemorySourceFileProvider provider) { | 97 MemorySourceFileProvider provider) { |
| 99 IncrementalCompiler compiler = new IncrementalCompiler( | 98 IncrementalCompiler compiler = new IncrementalCompiler( |
| (...skipping 16 matching lines...) Expand all Loading... |
| 116 | 115 |
| 117 void handler(Uri uri, | 116 void handler(Uri uri, |
| 118 int begin, | 117 int begin, |
| 119 int end, | 118 int end, |
| 120 String message, | 119 String message, |
| 121 Diagnostic kind) { | 120 Diagnostic kind) { |
| 122 if (kind != Diagnostic.VERBOSE_INFO) { | 121 if (kind != Diagnostic.VERBOSE_INFO) { |
| 123 print('$uri:$begin:$end:$message:$kind'); | 122 print('$uri:$begin:$end:$message:$kind'); |
| 124 } | 123 } |
| 125 } | 124 } |
| OLD | NEW |