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

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: 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') | client/testing/unittest/shared.dart » ('J')
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..2b65a497bb177ce8b6c2f758e8687fb90bf03d81
--- /dev/null
+++ b/client/testing/unittest/sample.dart
@@ -0,0 +1,45 @@
+// 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);
+ });
+}
sra1 2011/10/28 23:31:10 Can you add an async test?
Bob Nystrom 2011/10/28 23:57:48 Done. Async is still a little flaky (if an async t
« no previous file with comments | « no previous file | client/testing/unittest/shared.dart » ('j') | client/testing/unittest/shared.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698