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

Unified Diff: pkg/unittest/test/missing_tick_test.dart

Issue 524153002: Sharing metatest logic between unittest and scheduled_test (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: status fixes Created 6 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/unittest/test/missing_tick_test.dart
diff --git a/pkg/unittest/test/missing_tick_test.dart b/pkg/unittest/test/missing_tick_test.dart
index bc7bd580fc0c7e56cfde0fc42f8a8316b95b7938..bffd0affde205b507f3c51c0f7a927cc7d8fc279 100644
--- a/pkg/unittest/test/missing_tick_test.dart
+++ b/pkg/unittest/test/missing_tick_test.dart
@@ -6,13 +6,21 @@ library unittest.missing_tick_test;
import 'package:unittest/unittest.dart';
-// TODO(gram): Convert to a shouldFail passing test.
-void main() {
- SimpleConfiguration config = unittestConfiguration;
- config.timeout = const Duration(seconds: 2);
- group('Broken', () {
+import 'package:metatest/metatest.dart';
+
+void main() => initTests(_test);
+
+void _test(message) {
+ initMetatest(message, timeout: const Duration(seconds: 1));
+
+ expectTestResults('missing tick', () {
+
test('test that should time out', () {
expectAsync(() {});
});
- });
+ }, [{
+ 'description': 'test that should time out',
+ 'message': 'Test timed out after 1 seconds.',
+ 'result': 'error',
+ }]);
}
« no previous file with comments | « pkg/unittest/test/middle_exception_test.dart ('k') | pkg/unittest/test/nested_groups_setup_teardown_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698