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

Unified Diff: tests/standalone/src/io/DirectoryTest.dart

Issue 10021048: Remove need to instantiate Platform and make methods static. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add stable test binaries. Created 8 years, 8 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 | « tests/standalone/src/io/DirectoryErrorTest.dart ('k') | tests/standalone/src/io/FileErrorTest.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/src/io/DirectoryTest.dart
diff --git a/tests/standalone/src/io/DirectoryTest.dart b/tests/standalone/src/io/DirectoryTest.dart
index dd2f111900158462b50989a4684aec1f591e1fd3..48db4cd105f20cf2b9362790482b2b9894f0cc9a 100644
--- a/tests/standalone/src/io/DirectoryTest.dart
+++ b/tests/standalone/src/io/DirectoryTest.dart
@@ -322,7 +322,7 @@ class DirectoryTest {
Directory tempDirectory = new Directory("");
tempDirectory.createTemp(() {
String filename = tempDirectory.path +
- new Platform().pathSeparator() + "dart_testfile";
+ Platform.pathSeparator() + "dart_testfile";
File file = new File(filename);
Expect.isFalse(file.existsSync());
file.onError = (e) {
@@ -347,7 +347,7 @@ class DirectoryTest {
static void testCurrent() {
Directory current = new Directory.current();
- if (new Platform().operatingSystem() != "windows") {
+ if (Platform.operatingSystem() != "windows") {
Expect.equals("/", current.path.substring(0, 1));
}
}
@@ -387,7 +387,7 @@ class NestedTempDirectoryTest {
void createPhaseCallback() {
createdDirectories.add(current);
int nestingDepth = 6;
- var os = new Platform().operatingSystem();
+ var os = Platform.operatingSystem();
if (os == "windows") nestingDepth = 2;
if (createdDirectories.length < nestingDepth) {
current = new Directory(
@@ -416,7 +416,7 @@ class NestedTempDirectoryTest {
String illegalTempDirectoryLocation() {
// Determine a platform specific illegal location for a temporary directory.
- var os = new Platform().operatingSystem();
+ var os = Platform.operatingSystem();
if (os == "linux" || os == "macos") {
return "/dev/zero/";
}
« no previous file with comments | « tests/standalone/src/io/DirectoryErrorTest.dart ('k') | tests/standalone/src/io/FileErrorTest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698