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

Unified Diff: pkg/unittest/test/middle_exception_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
« no previous file with comments | « pkg/unittest/test/late_exception_test.dart ('k') | pkg/unittest/test/missing_tick_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/unittest/test/middle_exception_test.dart
diff --git a/pkg/unittest/test/middle_exception_test.dart b/pkg/unittest/test/middle_exception_test.dart
index 6fb1b7b8f550fa040158c8a8858073d6760a7e02..ba2d0d0942234370729f82d510de3912d915f029 100644
--- a/pkg/unittest/test/middle_exception_test.dart
+++ b/pkg/unittest/test/middle_exception_test.dart
@@ -2,28 +2,37 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-library unittestTest;
+library unittest.middle_exception_test;
import 'dart:async';
-import 'dart:isolate';
+import 'package:metatest/metatest.dart';
import 'package:unittest/unittest.dart';
-part 'utils.dart';
+void main() => initTests(_test);
-var testName = 'late exception test';
+void _test(message) {
+ initMetatest(message);
-var testFunction = (_) {
- test('testOne', () { expect(true, isTrue); });
- test('testTwo', () { expect(true, isFalse); });
- test('testThree', () {
- var done = expectAsync(() {});
- _defer(() {
+ expectTestResults('late exception test', () {
+ test('testOne', () {
expect(true, isTrue);
- done();
});
- });
-};
-
-final expected = buildStatusString(2, 1, 0,
- 'testOne::testTwo:Expected: false Actual: <true>:testThree');
+ test('testTwo', () {
+ expect(true, isFalse);
+ });
+ test('testThree', () {
+ var done = expectAsync(() {});
+ new Future.sync(() {
+ expect(true, isTrue);
+ done();
+ });
+ });
+ }, [{
+ 'result': 'pass'
+ }, {
+ 'result': 'fail',
+ }, {
+ 'result': 'pass'
+ }]);
+}
« no previous file with comments | « pkg/unittest/test/late_exception_test.dart ('k') | pkg/unittest/test/missing_tick_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698