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

Side by Side Diff: tests/standalone/io/test_extension_fail_test.dart

Issue 52723007: Revert "Change dart:io Platform.script to return a Uri." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tests/standalone/io/stdin_sync_test.dart ('k') | tests/standalone/io/test_extension_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 // 4 //
5 // Dart test program for testing native extensions. 5 // Dart test program for testing native extensions.
6 6
7 import "package:path/path.dart"; 7 import "package:path/path.dart";
8 import "dart:async"; 8 import "dart:async";
9 import "dart:io"; 9 import "dart:io";
10 10
(...skipping 18 matching lines...) Expand all
29 return join(buildDirectory, 'libtest_extension.dylib'); 29 return join(buildDirectory, 'libtest_extension.dylib');
30 case 'windows': 30 case 'windows':
31 return join(buildDirectory, 'test_extension.dll'); 31 return join(buildDirectory, 'test_extension.dll');
32 default: 32 default:
33 throw new StateError( 33 throw new StateError(
34 'Unknown operating system ${Platform.operatingSystem}'); 34 'Unknown operating system ${Platform.operatingSystem}');
35 } 35 }
36 } 36 }
37 37
38 void main() { 38 void main() {
39 String scriptDirectory = dirname(Platform.script.toFilePath()); 39 String scriptDirectory = dirname(Platform.script);
40 String buildDirectory = dirname(Platform.executable); 40 String buildDirectory = dirname(Platform.executable);
41 Directory tempDirectory = 41 Directory tempDirectory =
42 Directory.systemTemp.createTempSync('dart_test_extension_fail'); 42 Directory.systemTemp.createTempSync('dart_test_extension_fail');
43 String testDirectory = tempDirectory.path; 43 String testDirectory = tempDirectory.path;
44 44
45 // Copy test_extension shared library, test_extension.dart and 45 // Copy test_extension shared library, test_extension.dart and
46 // test_extension_fail_tester.dart to the temporary test directory. 46 // test_extension_fail_tester.dart to the temporary test directory.
47 copyFileToDirectory(getExtensionPath(buildDirectory), 47 copyFileToDirectory(getExtensionPath(buildDirectory),
48 testDirectory).then((_) { 48 testDirectory).then((_) {
49 var extensionDartFile = join(scriptDirectory, 'test_extension.dart'); 49 var extensionDartFile = join(scriptDirectory, 'test_extension.dart');
(...skipping 12 matching lines...) Expand all
62 throw new StateError("bad exit code"); 62 throw new StateError("bad exit code");
63 } 63 }
64 if (!result.stderr.contains("Unhandled exception:")) { 64 if (!result.stderr.contains("Unhandled exception:")) {
65 throw new StateError("stderr doesn't contain unhandled exception."); 65 throw new StateError("stderr doesn't contain unhandled exception.");
66 } 66 }
67 if (!result.stderr.contains("ball")) { 67 if (!result.stderr.contains("ball")) {
68 throw new StateError("stderr doesn't contain 'ball'."); 68 throw new StateError("stderr doesn't contain 'ball'.");
69 } 69 }
70 }).whenComplete(() => tempDirectory.deleteSync(recursive: true)); 70 }).whenComplete(() => tempDirectory.deleteSync(recursive: true));
71 } 71 }
OLDNEW
« no previous file with comments | « tests/standalone/io/stdin_sync_test.dart ('k') | tests/standalone/io/test_extension_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698