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

Unified Diff: pkg/scheduled_test/test/descriptor/async_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: 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/async_test.dart
diff --git a/pkg/scheduled_test/test/descriptor/async_test.dart b/pkg/scheduled_test/test/descriptor/async_test.dart
index b4fde985b93c34be5d57d71f44aad2f13700a903..3c6b4ad2b1a6722be1cd2b27e5094164b49d8dbd 100644
--- a/pkg/scheduled_test/test/descriptor/async_test.dart
+++ b/pkg/scheduled_test/test/descriptor/async_test.dart
@@ -72,8 +72,9 @@ void main() {
test('test 2', () {
expect(errors, everyElement(new isInstanceOf<ScheduleError>()));
expect(errors.length, equals(1));
- expect(errors.first.error,
- matches(r"^File not found: '[^']+[\\/]name\.txt'\.$"));
+ expect(errors.first.error, new isInstanceOf<TestFailure>());
nweiz 2013/09/20 21:45:41 The type of this exception isn't an important part
Bill Hesse 2013/09/23 17:15:25 Done.
+ expect(errors.first.error.message,
nweiz 2013/09/20 21:45:41 In keeping with the above, we should test [error.t
Bill Hesse 2013/09/23 17:15:25 Done.
+ matches(r"^File not found: '[^']+[\\/]name\.txt'\.$"));
});
}, passing: ['test 2']);
@@ -115,7 +116,8 @@ void main() {
test('test 2', () {
expect(errors, everyElement(new isInstanceOf<ScheduleError>()));
expect(errors.length, equals(1));
- expect(errors.first.error,
+ expect(errors.first.error, new isInstanceOf<TestFailure>());
+ expect(errors.first.error.message,
matches(r"^Directory not found: '[^']+[\\/]dir'\.$"));
});
}, passing: ['test 2']);

Powered by Google App Engine
This is Rietveld 408576698