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

Unified Diff: pkg/scheduled_test/test/descriptor/nothing_test.dart

Issue 24276010: Change package scheduled_test to throw TestFailures rather than strings. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Also in async_test.dart Created 7 years, 3 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
Index: pkg/scheduled_test/test/descriptor/nothing_test.dart
diff --git a/pkg/scheduled_test/test/descriptor/nothing_test.dart b/pkg/scheduled_test/test/descriptor/nothing_test.dart
index 5d145923ffd987e9616aa43f4fb7b935bb62210d..b3a74d13fda72879a809c53e0a8689391f0f15d0 100644
--- a/pkg/scheduled_test/test/descriptor/nothing_test.dart
+++ b/pkg/scheduled_test/test/descriptor/nothing_test.dart
@@ -54,11 +54,10 @@ void main() {
});
test('test 2', () {
- expect(errors, everyElement(new isInstanceOf<ScheduleError>()));
- expect(errors.length, equals(1));
- expect(errors.first.error,
+ expect(errors.single, new isInstanceOf<ScheduleError>());
+ expect(errors.single.error.toString(),
matches(r"^Expected nothing to exist at '[^']+[\\/]name.txt', but "
- r"found a file\.$"));
+ r"found a file\.$"));
});
}, passing: ['test 2']);
@@ -76,11 +75,10 @@ void main() {
});
test('test 2', () {
- expect(errors, everyElement(new isInstanceOf<ScheduleError>()));
- expect(errors.length, equals(1));
- expect(errors.first.error,
+ expect(errors.single, new isInstanceOf<ScheduleError>());
+ expect(errors.single.error.toString(),
matches(r"^Expected nothing to exist at '[^']+[\\/]dir', but found a "
r"directory\.$"));
});
}, passing: ['test 2']);
-}
+}
« no previous file with comments | « pkg/scheduled_test/test/descriptor/file_test.dart ('k') | pkg/scheduled_test/test/descriptor/pattern_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698