Chromium Code Reviews| 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
|