Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1216)

Unified Diff: pkg/analyzer/test/src/context/builder_test.dart

Issue 2712303002: Revert "debug ContextBuilder getAnalysisOptions on Windows" (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analyzer/lib/src/context/builder.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/src/context/builder_test.dart
diff --git a/pkg/analyzer/test/src/context/builder_test.dart b/pkg/analyzer/test/src/context/builder_test.dart
index 1a2a5e63b1671ed0a0c53aa0e0155d5d438fe065..83e059329844874a986cc88fb19345bfd8553651 100644
--- a/pkg/analyzer/test/src/context/builder_test.dart
+++ b/pkg/analyzer/test/src/context/builder_test.dart
@@ -105,13 +105,7 @@ const Map<String, LibraryInfo> libraries = const {
@override
void setUp() {
- resourceProvider = new MemoryResourceProvider(
- // On Windows, ensure that the current drive matches
- // the drive inserted by MemoryResourceProvider.convertPath
- // so that packages are mapped to the correct drive
- context: path.style == path.Style.windows
- ? new path.Context(current: 'C:\\')
- : null);
+ resourceProvider = new MemoryResourceProvider();
pathContext = resourceProvider.pathContext;
new MockSdk(resourceProvider: resourceProvider);
sdkManager =
@@ -728,32 +722,24 @@ linter:
AnalysisOptionsImpl expected = new AnalysisOptionsImpl();
expected.lint = true;
expected.lintRules = <Linter>[_mockLintRule];
- String packagesFilePath =
- resourceProvider.convertPath('/some/directory/path/.packages');
- print('>>> packages: $packagesFilePath');
- createFile(packagesFilePath, 'flutter:/pkg/flutter/lib/');
- String optionsFilePath = resourceProvider
- .convertPath('/pkg/flutter/lib/analysis_options_user.yaml');
- print('>>> options: $optionsFilePath');
createFile(
- optionsFilePath,
+ resourceProvider.convertPath('/some/directory/path/.packages'),
+ '''
+flutter:/pkg/flutter/lib/
+''');
+ createFile(
+ resourceProvider
+ .convertPath('/pkg/flutter/lib/analysis_options_user.yaml'),
'''
linter:
rules:
- mock_lint_rule
''');
- String projPath = resourceProvider.convertPath('/some/directory/path');
- AnalysisOptions options = builder.getAnalysisOptions(projPath);
+ AnalysisOptions options = builder.getAnalysisOptions(
+ resourceProvider.convertPath('/some/directory/path'));
// TODO(danrubel) fix on Windows
if (resourceProvider.absolutePathContext.separator != r'\') {
_expectEqualOptions(options, expected);
- } else {
- // echo some debugging information
- print('>>> projPath: $projPath');
- print('>>> ${builderOptions.defaultAnalysisOptionsFilePath}');
- print('>>> getOptionsFile: ${builder.getOptionsFile(projPath)}');
- _expectEqualOptions(options, expected);
- fail('>>>>>>> Fail to echo test output on bots <<<<<<<');
}
}
« no previous file with comments | « pkg/analyzer/lib/src/context/builder.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698