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

Unified Diff: pkg/unittest/test/correct_callback_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/completion_test.dart ('k') | pkg/unittest/test/exception_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/unittest/test/correct_callback_test.dart
diff --git a/pkg/unittest/test/correct_callback_test.dart b/pkg/unittest/test/correct_callback_test.dart
index a5689b94ecc43f866be31a29e655ac2be6029ad4..f69766ed546bc437ca79a80c3db4d899e5fd9f28 100644
--- a/pkg/unittest/test/correct_callback_test.dart
+++ b/pkg/unittest/test/correct_callback_test.dart
@@ -2,20 +2,26 @@
// 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.correct_callback_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 = 'correct callback test';
+void _test(message) {
+ initMetatest(message);
-var testFunction = (TestConfiguration testConfig) {
- test(testName,
- () =>_defer(expectAsync((){ ++testConfig.count;})));
-};
+ expectTestsPass('correct callback test', () {
+ var count = 0;
+ test('test', () => new Future.sync(expectAsync(() {
+ ++count;
+ })));
-var expected = buildStatusString(1, 0, 0, testName, count: 1);
+ test('verify count', () {
+ expect(count, 1);
+ });
+ });
+}
« no previous file with comments | « pkg/unittest/test/completion_test.dart ('k') | pkg/unittest/test/exception_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698