mirror of
https://github.com/dart-lang/sdk
synced 2024-10-06 15:50:01 +00:00
Move annotated_code_helper.dart into front_end.
This avoids the need for the analyzer to depend on the unpublished package sourcemap_testing. Change-Id: I7632df2028d4f3557d2c5c4a3a75510cda968efd Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108268 Commit-Queue: Paul Berry <paulberry@google.com> Reviewed-by: Johnni Winther <johnniwinther@google.com>
This commit is contained in:
parent
cea3d85ade
commit
c0932a8af6
|
@ -11,9 +11,9 @@
|
|||
import 'package:analyzer/dart/analysis/results.dart';
|
||||
import 'package:analyzer/dart/analysis/utilities.dart';
|
||||
import 'package:analyzer/dart/ast/ast.dart' hide Annotation;
|
||||
import 'package:front_end/src/testing/annotated_code_helper.dart';
|
||||
import 'package:front_end/src/testing/id.dart'
|
||||
show ActualData, Id, IdValue, MemberId, NodeId;
|
||||
import 'package:sourcemap_testing/src/annotated_code_helper.dart';
|
||||
|
||||
/// Checks [compiledData] against the expected data in [expectedMap] derived
|
||||
/// from [code].
|
||||
|
|
|
@ -7,7 +7,7 @@ import 'dart:async' show Future;
|
|||
import 'dart:io';
|
||||
|
||||
import 'package:path/path.dart' as path;
|
||||
import 'package:sourcemap_testing/src/annotated_code_helper.dart';
|
||||
import 'package:front_end/src/testing/annotated_code_helper.dart';
|
||||
import 'package:sourcemap_testing/src/stepping_helper.dart';
|
||||
import 'package:testing/testing.dart';
|
||||
|
||||
|
|
|
@ -8,8 +8,8 @@ import 'dart:io';
|
|||
import 'dart:mirrors' show currentMirrorSystem;
|
||||
|
||||
import 'package:front_end/src/api_unstable/ddc.dart' as fe;
|
||||
import 'package:front_end/src/testing/annotated_code_helper.dart';
|
||||
import 'package:path/path.dart' as path;
|
||||
import 'package:sourcemap_testing/src/annotated_code_helper.dart';
|
||||
import 'package:sourcemap_testing/src/stacktrace_helper.dart';
|
||||
import 'package:sourcemap_testing/src/stepping_helper.dart';
|
||||
import 'package:testing/testing.dart';
|
||||
|
|
|
@ -7,13 +7,12 @@ import 'dart:io';
|
|||
import 'dart:convert' show jsonDecode;
|
||||
|
||||
import 'package:expect/expect.dart';
|
||||
import 'package:front_end/src/testing/annotated_code_helper.dart';
|
||||
import 'package:source_maps/source_maps.dart';
|
||||
import 'package:source_maps/src/utils.dart';
|
||||
import 'package:source_span/source_span.dart';
|
||||
import 'package:dart2js_tools/src/dart2js_mapping.dart';
|
||||
|
||||
import 'annotated_code_helper.dart';
|
||||
|
||||
const String INPUT_FILE_NAME = 'input.dart';
|
||||
|
||||
class Test {
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
import 'dart:io';
|
||||
|
||||
import 'package:expect/minitest.dart';
|
||||
import 'package:front_end/src/testing/annotated_code_helper.dart';
|
||||
import 'package:path/path.dart' as path;
|
||||
import 'package:source_maps/source_maps.dart';
|
||||
|
||||
import 'annotated_code_helper.dart';
|
||||
|
||||
/**
|
||||
* Runs D8 and steps as the AnnotatedCode dictates.
|
||||
*
|
||||
|
|
|
@ -8,3 +8,4 @@ environment:
|
|||
dependencies:
|
||||
package_config: '>=0.1.1 <2.0.0'
|
||||
pub_semver: ^1.2.1
|
||||
front_end: ^0.1.20
|
||||
|
|
|
@ -14,7 +14,7 @@ import 'package:compiler/src/compiler.dart';
|
|||
import 'package:compiler/src/elements/entities.dart';
|
||||
import 'package:compiler/src/util/features.dart';
|
||||
import 'package:expect/expect.dart';
|
||||
import 'package:sourcemap_testing/src/annotated_code_helper.dart';
|
||||
import 'package:front_end/src/testing/annotated_code_helper.dart';
|
||||
|
||||
import '../helpers/memory_compiler.dart';
|
||||
import '../equivalence/id_equivalence.dart';
|
||||
|
|
|
@ -9,7 +9,7 @@ import 'package:async_helper/async_helper.dart';
|
|||
import 'package:compiler/compiler_new.dart';
|
||||
import 'package:expect/expect.dart';
|
||||
import 'package:source_maps/source_maps.dart';
|
||||
import 'package:sourcemap_testing/src/annotated_code_helper.dart';
|
||||
import 'package:front_end/src/testing/annotated_code_helper.dart';
|
||||
|
||||
import '../helpers/memory_compiler.dart';
|
||||
|
||||
|
@ -72,7 +72,7 @@ void main(List<String> arguments) {
|
|||
} else if (arg == '--write-js') {
|
||||
writeJs = true;
|
||||
} else {
|
||||
int index = int.parse(arg, onError: (_) => null);
|
||||
int index = int.tryParse(arg);
|
||||
if (index != null) {
|
||||
indices ??= <int>[];
|
||||
if (index < 0 || index >= TESTS.length) {
|
||||
|
|
|
@ -11,7 +11,7 @@ import 'package:compiler/compiler_new.dart';
|
|||
import 'package:compiler/src/commandline_options.dart';
|
||||
import 'package:compiler/src/dart2js.dart' as entry;
|
||||
import 'package:expect/expect.dart';
|
||||
import 'package:sourcemap_testing/src/annotated_code_helper.dart';
|
||||
import 'package:front_end/src/testing/annotated_code_helper.dart';
|
||||
import 'package:sourcemap_testing/src/stepping_helper.dart';
|
||||
|
||||
void main(List<String> args) {
|
||||
|
|
Loading…
Reference in a new issue