| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 import 'dart:async'; | 5 import 'dart:async'; |
| 6 import 'package:async_helper/async_helper.dart'; | 6 import 'package:async_helper/async_helper.dart'; |
| 7 import 'package:expect/expect.dart'; | 7 import 'package:expect/expect.dart'; |
| 8 import 'package:compiler/src/io/source_information.dart'; | 8 import 'package:compiler/src/io/source_information.dart'; |
| 9 import 'package:compiler/src/js/js_debug.dart'; | 9 import 'package:compiler/src/js/js_debug.dart'; |
| 10 import 'package:js_ast/js_ast.dart'; | 10 import 'package:js_ast/js_ast.dart'; |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 print("Unknown configuration or file '$argument'. " | 91 print("Unknown configuration or file '$argument'. " |
| 92 "Must be one of '${TEST_CONFIGURATIONS.keys.join("', '")}' or " | 92 "Must be one of '${TEST_CONFIGURATIONS.keys.join("', '")}' or " |
| 93 "'${TEST_FILES.keys.join("', '")}'."); | 93 "'${TEST_FILES.keys.join("', '")}'."); |
| 94 return false; | 94 return false; |
| 95 } | 95 } |
| 96 return true; | 96 return true; |
| 97 } | 97 } |
| 98 | 98 |
| 99 const Map<String, List<String>> TEST_CONFIGURATIONS = const { | 99 const Map<String, List<String>> TEST_CONFIGURATIONS = const { |
| 100 'ssa': const ['--use-new-source-info', ], | 100 'ssa': const ['--use-new-source-info', ], |
| 101 'cps': const ['--use-new-source-info', '--use-cps-ir'], | |
| 102 'old': const [], | 101 'old': const [], |
| 103 }; | 102 }; |
| 104 | 103 |
| 105 const Map<String, String> TEST_FILES = const <String, String>{ | 104 const Map<String, String> TEST_FILES = const <String, String>{ |
| 106 'invokes': 'tests/compiler/dart2js/sourcemaps/invokes_test_file.dart', | 105 'invokes': 'tests/compiler/dart2js/sourcemaps/invokes_test_file.dart', |
| 107 'operators': 'tests/compiler/dart2js/sourcemaps/operators_test_file.dart', | 106 'operators': 'tests/compiler/dart2js/sourcemaps/operators_test_file.dart', |
| 108 }; | 107 }; |
| 109 | 108 |
| 110 Future<TestResult> runTests( | 109 Future<TestResult> runTests( |
| 111 String config, | 110 String config, |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 void printMultipleOffsets() { | 206 void printMultipleOffsets() { |
| 208 multipleOffsetsMap.forEach((info, multipleMap) { | 207 multipleOffsetsMap.forEach((info, multipleMap) { |
| 209 multipleMap.forEach((targetOffset, sourceLocations) { | 208 multipleMap.forEach((targetOffset, sourceLocations) { |
| 210 print( | 209 print( |
| 211 'Multiple source locations:\n ${sourceLocations.join('\n ')}\n' | 210 'Multiple source locations:\n ${sourceLocations.join('\n ')}\n' |
| 212 'for offset $targetOffset in ${info.element} in $file.'); | 211 'for offset $targetOffset in ${info.element} in $file.'); |
| 213 }); | 212 }); |
| 214 }); | 213 }); |
| 215 } | 214 } |
| 216 } | 215 } |
| OLD | NEW |