Skip to content

Commit d5da922

Browse files
authored
Expose the backend APIs used by flutter_test from test_api (#2635)
This will allow `test_api` to be unpinned from the flutter SDK. Increases package surface area, perhaps further than we would like in the long run. Makes the current dependencies visible. Part of flutter/flutter#185016
1 parent c8c76f4 commit d5da922

9 files changed

Lines changed: 22 additions & 13 deletions

File tree

‎pkgs/test/CHANGELOG.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
## 1.31.2-wip
2+
13
## 1.31.1
24

35
* Ignore an error locating the SDK directory on platforms where the

‎pkgs/test/pubspec.yaml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: test
2-
version: 1.31.1
2+
version: 1.31.2-wip
33
description: >-
44
A full featured library for writing and running Dart tests across platforms.
55
repository: https://github.com/dart-lang/test/tree/master/pkgs/test
@@ -35,8 +35,8 @@ dependencies:
3535
stream_channel: ^2.1.0
3636

3737
# Use an exact version until the test_api and test_core package are stable.
38-
test_api: 0.7.12
39-
test_core: 0.6.18
38+
test_api: 0.7.13-wip
39+
test_core: 0.6.19-wip
4040

4141
typed_data: ^1.3.0
4242
web_socket_channel: '>=2.0.0 <4.0.0'

‎pkgs/test_api/CHANGELOG.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.7.13-wip
2+
3+
* Expose several more backend APIs for use in `flutter_test`.
4+
15
## 0.7.12
26

37
* Allow `analyzer` major version 13.

‎pkgs/test_api/lib/backend.dart‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,20 @@
33
// BSD-style license that can be found in the LICENSE file.
44

55
export 'src/backend/compiler.dart' show Compiler;
6+
export 'src/backend/declarer.dart' show Declarer;
7+
export 'src/backend/group.dart' show Group;
8+
export 'src/backend/group_entry.dart' show GroupEntry;
9+
export 'src/backend/invoker.dart' show Invoker;
10+
export 'src/backend/live_test.dart' show LiveTest;
11+
export 'src/backend/message.dart' show Message;
612
export 'src/backend/metadata.dart' show Metadata;
713
export 'src/backend/platform_selector.dart' show PlatformSelector;
814
export 'src/backend/remote_exception.dart' show RemoteException;
915
export 'src/backend/remote_listener.dart' show RemoteListener;
1016
export 'src/backend/runtime.dart' show Runtime;
1117
export 'src/backend/stack_trace_formatter.dart' show StackTraceFormatter;
1218
export 'src/backend/stack_trace_mapper.dart' show StackTraceMapper;
19+
export 'src/backend/state.dart' show State;
1320
export 'src/backend/suite_platform.dart' show SuitePlatform;
21+
export 'src/backend/test.dart' show Test;
1422
export 'src/backend/test_location.dart' show TestLocation;

‎pkgs/test_api/pubspec.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: test_api
2-
version: 0.7.12
2+
version: 0.7.13-wip
33
description: >-
44
The user facing API for structuring Dart tests and checking expectations.
55
repository: https://github.com/dart-lang/test/tree/master/pkgs/test_api

‎pkgs/test_core/CHANGELOG.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
## 0.6.19-wip
2+
13
## 0.6.18
24

35
* Ignore an error locating the SDK directory on platforms where the

‎pkgs/test_core/lib/src/direct_run.dart‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,6 @@ import 'dart:collection';
77

88
import 'package:path/path.dart' as p;
99
import 'package:test_api/backend.dart';
10-
import 'package:test_api/src/backend/declarer.dart'; //ignore: implementation_imports
11-
import 'package:test_api/src/backend/group.dart'; //ignore: implementation_imports
12-
import 'package:test_api/src/backend/group_entry.dart'; //ignore: implementation_imports
13-
import 'package:test_api/src/backend/invoker.dart'; // ignore: implementation_imports
14-
import 'package:test_api/src/backend/test.dart'; //ignore: implementation_imports
1510

1611
import 'runner/configuration.dart';
1712
import 'runner/engine.dart';

‎pkgs/test_core/lib/src/scaffolding.dart‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ import 'package:meta/meta.dart' show doNotSubmit, isTest, isTestGroup;
88
import 'package:path/path.dart' as p;
99
import 'package:test_api/backend.dart';
1010
import 'package:test_api/scaffolding.dart' show Timeout, pumpEventQueue;
11-
import 'package:test_api/src/backend/declarer.dart'; // ignore: implementation_imports
12-
import 'package:test_api/src/backend/invoker.dart'; // ignore: implementation_imports
1311

1412
import 'runner/engine.dart';
1513
import 'runner/plugin/environment.dart';

‎pkgs/test_core/pubspec.yaml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: test_core
2-
version: 0.6.18
2+
version: 0.6.19-wip
33
description: A basic library for writing tests and running them on the VM.
44
repository: https://github.com/dart-lang/test/tree/master/pkgs/test_core
55
issue_tracker: https://github.com/dart-lang/test/issues?q=is%3Aissue+is%3Aopen+label%3Apackage%3Atest
@@ -28,7 +28,7 @@ dependencies:
2828
stack_trace: ^1.10.0
2929
stream_channel: ^2.1.0
3030
# Use an exact version until the test_api package is stable.
31-
test_api: 0.7.12
31+
test_api: 0.7.13-wip
3232
vm_service: '>=6.0.0 <16.0.0'
3333
yaml: ^3.0.0
3434

0 commit comments

Comments
 (0)