7
7
8
8
import 'dart:async' ;
9
9
import 'dart:io' ;
10
- import 'dart:mirrors' ;
11
10
12
11
import 'package:dartdoc/src/package_meta.dart' ;
13
12
import 'package:path/path.dart' as path;
@@ -17,11 +16,6 @@ import 'package:test_process/test_process.dart';
17
16
import '../src/test_descriptor_utils.dart' as d;
18
17
import '../src/utils.dart' ;
19
18
20
- Uri get _currentFileUri =>
21
- (reflect (main) as ClosureMirror ).function.location! .sourceUri;
22
- String get _testPackageFlutterPluginPath => path.fromUri (_currentFileUri
23
- .resolve ('../../testing/flutter_packages/test_package_flutter_plugin' ));
24
-
25
19
var _dartdocPath = path.canonicalize (path.join ('bin' , 'dartdoc.dart' ));
26
20
27
21
/// Runs dartdoc via [TestProcess.start] .
@@ -103,28 +97,4 @@ void main() {
103
97
);
104
98
await process.shouldExit (1 );
105
99
});
106
-
107
- test ('with missing FLUTTER_ROOT exception reports an error' , () async {
108
- // TODO(srawlins): Remove test_package_flutter_plugin and generate afresh.
109
- var dartTool =
110
- Directory (path.join (_testPackageFlutterPluginPath, '.dart_tool' ));
111
- if (dartTool.existsSync ()) dartTool.deleteSync (recursive: true );
112
- var process = await runDartdoc (
113
- [],
114
- workingDirectory: _testPackageFlutterPluginPath,
115
- environment: {...Platform .environment}..remove ('FLUTTER_ROOT' ),
116
- includeParentEnvironment: false ,
117
- );
118
- await expectLater (
119
- process.stderr,
120
- emitsThrough (
121
- matches (
122
- 'Top level package requires Flutter but FLUTTER_ROOT environment '
123
- 'variable not set|test_package_flutter_plugin requires the Flutter '
124
- 'SDK, version solving failed' ,
125
- ),
126
- ),
127
- );
128
- await process.shouldExit (1 );
129
- });
130
100
}
0 commit comments