Skip to content

Commit dcfd35f

Browse files
authored
Remove uses of deprecated test_api imports (#124732)
Most of these imports were never appropriate. The `test_api` package was never intended for use in `_test.dart` files. Where possible move imports to `matcher`, otherwise move them to `test` or `flutter_test`. Leave uses of `test_api` from `flutter_test` library code.
1 parent 55825f1 commit dcfd35f

26 files changed

+143
-160
lines changed

dev/integration_tests/flutter_gallery/test/calculator/logic.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44

55
import 'package:flutter_gallery/demo/calculator/logic.dart';
66

7-
// ignore: deprecated_member_use
8-
import 'package:test_api/test_api.dart' hide TypeMatcher, isInstanceOf;
7+
import 'package:test/test.dart' hide TypeMatcher, isInstanceOf;
98

109
void main() {
1110
test('Test order of operations: 12 + 3 * 4 = 24', () {

dev/missing_dependency_tests/trivial_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5-
import 'package:test_api/test_api.dart' hide TypeMatcher, isInstanceOf;
5+
import 'package:test/test.dart' hide TypeMatcher, isInstanceOf;
66

77
void main() {
88
test('Trivial test', () {

examples/layers/test/smoketests/raw/canvas_test.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5-
// ignore: deprecated_member_use
6-
import 'package:test_api/test_api.dart' hide TypeMatcher, isInstanceOf;
5+
import 'package:flutter_test/flutter_test.dart' hide TypeMatcher, isInstanceOf;
76

87
import '../../../raw/canvas.dart' as demo;
98

examples/layers/test/smoketests/raw/hello_world_test.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5-
// ignore: deprecated_member_use
6-
import 'package:test_api/test_api.dart' hide TypeMatcher, isInstanceOf;
5+
import 'package:flutter_test/flutter_test.dart' hide TypeMatcher, isInstanceOf;
76

87
import '../../../raw/hello_world.dart' as demo;
98

examples/layers/test/smoketests/raw/spinning_square_test.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5-
// ignore: deprecated_member_use
6-
import 'package:test_api/test_api.dart' hide TypeMatcher, isInstanceOf;
5+
import 'package:flutter_test/flutter_test.dart' hide TypeMatcher, isInstanceOf;
76

87
import '../../../raw/spinning_square.dart' as demo;
98

examples/layers/test/smoketests/raw/text_test.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5-
// ignore: deprecated_member_use
6-
import 'package:test_api/test_api.dart' hide TypeMatcher, isInstanceOf;
5+
import 'package:flutter_test/flutter_test.dart' hide TypeMatcher, isInstanceOf;
76

87
import '../../../raw/text.dart' as demo;
98

examples/layers/test/smoketests/raw/touch_input_test.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5-
// ignore: deprecated_member_use
6-
import 'package:test_api/test_api.dart' hide TypeMatcher, isInstanceOf;
5+
import 'package:flutter_test/flutter_test.dart' hide TypeMatcher, isInstanceOf;
76

87
import '../../../raw/touch_input.dart' as demo;
98

examples/layers/test/smoketests/rendering/custom_coordinate_systems_test.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44

55
import 'package:flutter/foundation.dart';
66
import 'package:flutter/scheduler.dart';
7-
// ignore: deprecated_member_use
8-
import 'package:test_api/test_api.dart' hide TypeMatcher, isInstanceOf;
7+
import 'package:flutter_test/flutter_test.dart' hide TypeMatcher, isInstanceOf;
98

109
import '../../../rendering/custom_coordinate_systems.dart' as demo;
1110

examples/layers/test/smoketests/rendering/flex_layout_test.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44

55
import 'package:flutter/foundation.dart';
66
import 'package:flutter/scheduler.dart';
7-
// ignore: deprecated_member_use
8-
import 'package:test_api/test_api.dart' hide TypeMatcher, isInstanceOf;
7+
import 'package:flutter_test/flutter_test.dart' hide TypeMatcher, isInstanceOf;
98

109
import '../../../rendering/flex_layout.dart' as demo;
1110

examples/layers/test/smoketests/rendering/hello_world_test.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44

55
import 'package:flutter/foundation.dart';
66
import 'package:flutter/scheduler.dart';
7-
// ignore: deprecated_member_use
8-
import 'package:test_api/test_api.dart' hide TypeMatcher, isInstanceOf;
7+
import 'package:flutter_test/flutter_test.dart' hide TypeMatcher, isInstanceOf;
98

109
import '../../../rendering/hello_world.dart' as demo;
1110

0 commit comments

Comments
 (0)