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

Unified Diff: client/testing/unittest/sample.dart

Issue 8413058: Add command-line non-client support to unit test lib. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rename a couple of methods. Created 9 years, 2 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 | « no previous file | client/testing/unittest/shared.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/testing/unittest/sample.dart
diff --git a/client/testing/unittest/sample.dart b/client/testing/unittest/sample.dart
new file mode 100644
index 0000000000000000000000000000000000000000..1096c3b2a49cd8a552b6634cc545ba7eadf3a1d2
--- /dev/null
+++ b/client/testing/unittest/sample.dart
@@ -0,0 +1,57 @@
+// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
+// 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.
+
+// Just a dumb test script to validate that the VM flavor works.
+
+#library('sample');
+
+#import('unittest_vm.dart');
+
+main() {
+ group('group 1', () {
+ test('passing test 1', () {
+ expect(1).equals(1);
+ expect(1).equals(1);
+ });
+
+ test('failing test 2', () {
+ expect(1).equals(1);
+ expect(1).equals(2);
+ });
+ });
+
+ group('group 2', () {
+ test('passing test 3', () {
+ expect(1).equals(1);
+ expect(1).equals(1);
+ });
+
+ test('failing test 4', () {
+ expect(1).equals(1);
+ expect(1).equals(2);
+ });
+ });
+
+ test('ungrouped passing test 5', () {
+ expect(1).equals(1);
+ expect(1).equals(1);
+ });
+
+ test('ungrouped failing test 5', () {
+ expect(1).equals(1);
+ expect(1).equals(2);
+ });
+
+ asyncTest('async', 2, () {
+ new Timer((timer) {
+ expect(1).equals(1);
+ callbackDone();
+
+ new Timer((timer) {
+ expect(1).equals(1);
+ callbackDone();
+ }, 10, false);
+ }, 10, false);
+ });
+}
« no previous file with comments | « no previous file | client/testing/unittest/shared.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698