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

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

Issue 8937004: Use Expect.throws for directory test (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 9 years 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: tests/standalone/src/DirectoryTest.dart
diff --git a/tests/standalone/src/DirectoryTest.dart b/tests/standalone/src/DirectoryTest.dart
index 9ebe922064d3180a1f568c2a3130c8ea3e0c9f3a..d015ea6868654c8dd89a8c90d3991d8b1ae1826a 100644
--- a/tests/standalone/src/DirectoryTest.dart
+++ b/tests/standalone/src/DirectoryTest.dart
@@ -264,13 +264,8 @@ String illegalTempDirectoryLocation() {
testCreateTempErrorSync() {
var location = illegalTempDirectoryLocation();
if (location != null) {
- bool exception = false;
- try {
- new Directory(location).createTempSync();
- } catch(DirectoryException e) {
- exception = true;
- }
- Expect.isTrue(exception);
+ Expect.throws(new Directory(location).createTempSync,
+ (e) => e is DirectoryException);
}
}
« 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