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

Unified Diff: pkg/front_end/test/src/base/processed_options_test.dart

Issue 2994683002: Replace fake directories with actual createDirectory(). (Closed)
Patch Set: Created 3 years, 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/front_end/test/src/base/processed_options_test.dart
diff --git a/pkg/front_end/test/src/base/processed_options_test.dart b/pkg/front_end/test/src/base/processed_options_test.dart
index 883dbc995586146497aa3df2e15b6d110a9f38a6..2f6bd65496c4dd2e13007317e14de7c6ae88f3ae 100644
--- a/pkg/front_end/test/src/base/processed_options_test.dart
+++ b/pkg/front_end/test/src/base/processed_options_test.dart
@@ -12,7 +12,6 @@ import 'package:front_end/src/fasta/fasta_codes.dart';
import 'package:kernel/binary/ast_to_binary.dart' show BinaryPrinter;
import 'package:kernel/kernel.dart' show Program, Library, CanonicalName;
import 'package:package_config/packages.dart' show Packages;
-
import 'package:test/test.dart';
import 'package:test_reflective_loader/test_reflective_loader.dart';
@@ -143,14 +142,14 @@ class ProcessedOptionsTest {
}
test_getUriTranslator_implicitPackagesFile_nextToScript() async {
- // Fake the existence of the base directory.
+ // Create the base directory.
fileSystem
.entityForUri(Uri.parse('file:///base/location/'))
- .writeAsStringSync('');
+ .createDirectory();
// Packages directory should be ignored (.packages file takes precedence).
fileSystem
.entityForUri(Uri.parse('file:///base/location/packages/'))
- .writeAsStringSync('');
+ .createDirectory();
// This .packages file should be ignored.
fileSystem
.entityForUri(Uri.parse('file:///.packages'))
@@ -167,10 +166,10 @@ class ProcessedOptionsTest {
}
test_getUriTranslator_implicitPackagesFile_searchAbove() async {
- // Fake the existence of the base directory.
+ // Create the base directory.
fileSystem
.entityForUri(Uri.parse('file:///base/location/'))
- .writeAsStringSync('');
+ .createDirectory();
// This .packages file should be ignored.
fileSystem
.entityForUri(Uri.parse('file:///.packages'))
@@ -187,13 +186,13 @@ class ProcessedOptionsTest {
}
test_getUriTranslator_implicitPackagesFile_packagesDirectory() async {
- // Fake the existence of the base directory.
+ // Create the base directory.
fileSystem
.entityForUri(Uri.parse('file:///base/location/'))
- .writeAsStringSync('');
+ .createDirectory();
fileSystem
.entityForUri(Uri.parse('file:///base/location/packages/'))
- .writeAsStringSync('');
+ .createDirectory();
// Both of these .packages file should be ignored.
fileSystem
@@ -211,10 +210,10 @@ class ProcessedOptionsTest {
}
test_getUriTranslator_implicitPackagesFile_noPackages() async {
- // Fake the existence of the base directory.
+ // Create the base directory.
fileSystem
.entityForUri(Uri.parse('file:///base/location/'))
- .writeAsStringSync('');
+ .createDirectory();
var errors = [];
// .packages file should be ignored.
var raw = new CompilerOptions()
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698