Skip to content

Commit c0932a8

Browse files
stereotype441commit-bot@chromium.org
authored andcommitted
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 <[email protected]> Reviewed-by: Johnni Winther <[email protected]>
1 parent cea3d85 commit c0932a8

File tree

10 files changed

+10
-11
lines changed

10 files changed

+10
-11
lines changed

pkg/analyzer/test/util/id_equivalence_helper.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
import 'package:analyzer/dart/analysis/results.dart';
1212
import 'package:analyzer/dart/analysis/utilities.dart';
1313
import 'package:analyzer/dart/ast/ast.dart' hide Annotation;
14+
import 'package:front_end/src/testing/annotated_code_helper.dart';
1415
import 'package:front_end/src/testing/id.dart'
1516
show ActualData, Id, IdValue, MemberId, NodeId;
16-
import 'package:sourcemap_testing/src/annotated_code_helper.dart';
1717

1818
/// Checks [compiledData] against the expected data in [expectedMap] derived
1919
/// from [code].

pkg/dev_compiler/test/sourcemap/common.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import 'dart:async' show Future;
77
import 'dart:io';
88

99
import 'package:path/path.dart' as path;
10-
import 'package:sourcemap_testing/src/annotated_code_helper.dart';
10+
import 'package:front_end/src/testing/annotated_code_helper.dart';
1111
import 'package:sourcemap_testing/src/stepping_helper.dart';
1212
import 'package:testing/testing.dart';
1313

pkg/dev_compiler/test/sourcemap/ddc_common.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import 'dart:io';
88
import 'dart:mirrors' show currentMirrorSystem;
99

1010
import 'package:front_end/src/api_unstable/ddc.dart' as fe;
11+
import 'package:front_end/src/testing/annotated_code_helper.dart';
1112
import 'package:path/path.dart' as path;
12-
import 'package:sourcemap_testing/src/annotated_code_helper.dart';
1313
import 'package:sourcemap_testing/src/stacktrace_helper.dart';
1414
import 'package:sourcemap_testing/src/stepping_helper.dart';
1515
import 'package:testing/testing.dart';

pkg/sourcemap_testing/lib/src/stacktrace_helper.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,12 @@ import 'dart:io';
77
import 'dart:convert' show jsonDecode;
88

99
import 'package:expect/expect.dart';
10+
import 'package:front_end/src/testing/annotated_code_helper.dart';
1011
import 'package:source_maps/source_maps.dart';
1112
import 'package:source_maps/src/utils.dart';
1213
import 'package:source_span/source_span.dart';
1314
import 'package:dart2js_tools/src/dart2js_mapping.dart';
1415

15-
import 'annotated_code_helper.dart';
16-
1716
const String INPUT_FILE_NAME = 'input.dart';
1817

1918
class Test {

pkg/sourcemap_testing/lib/src/stepping_helper.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
import 'dart:io';
22

33
import 'package:expect/minitest.dart';
4+
import 'package:front_end/src/testing/annotated_code_helper.dart';
45
import 'package:path/path.dart' as path;
56
import 'package:source_maps/source_maps.dart';
67

7-
import 'annotated_code_helper.dart';
8-
98
/**
109
* Runs D8 and steps as the AnnotatedCode dictates.
1110
*

pkg/sourcemap_testing/pubspec.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ environment:
88
dependencies:
99
package_config: '>=0.1.1 <2.0.0'
1010
pub_semver: ^1.2.1
11+
front_end: ^0.1.20

tests/compiler/dart2js/equivalence/id_equivalence_helper.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import 'package:compiler/src/compiler.dart';
1414
import 'package:compiler/src/elements/entities.dart';
1515
import 'package:compiler/src/util/features.dart';
1616
import 'package:expect/expect.dart';
17-
import 'package:sourcemap_testing/src/annotated_code_helper.dart';
17+
import 'package:front_end/src/testing/annotated_code_helper.dart';
1818

1919
import '../helpers/memory_compiler.dart';
2020
import '../equivalence/id_equivalence.dart';

tests/compiler/dart2js/sourcemaps/mapping_test.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import 'package:async_helper/async_helper.dart';
99
import 'package:compiler/compiler_new.dart';
1010
import 'package:expect/expect.dart';
1111
import 'package:source_maps/source_maps.dart';
12-
import 'package:sourcemap_testing/src/annotated_code_helper.dart';
12+
import 'package:front_end/src/testing/annotated_code_helper.dart';
1313

1414
import '../helpers/memory_compiler.dart';
1515

@@ -72,7 +72,7 @@ void main(List<String> arguments) {
7272
} else if (arg == '--write-js') {
7373
writeJs = true;
7474
} else {
75-
int index = int.parse(arg, onError: (_) => null);
75+
int index = int.tryParse(arg);
7676
if (index != null) {
7777
indices ??= <int>[];
7878
if (index < 0 || index >= TESTS.length) {

tests/compiler/dart2js/sourcemaps/stepping_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import 'package:compiler/compiler_new.dart';
1111
import 'package:compiler/src/commandline_options.dart';
1212
import 'package:compiler/src/dart2js.dart' as entry;
1313
import 'package:expect/expect.dart';
14-
import 'package:sourcemap_testing/src/annotated_code_helper.dart';
14+
import 'package:front_end/src/testing/annotated_code_helper.dart';
1515
import 'package:sourcemap_testing/src/stepping_helper.dart';
1616

1717
void main(List<String> args) {

0 commit comments

Comments
 (0)