Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | |
| 2 // for details. All rights reserved. Use of this source code is governed by a | |
| 3 // BSD-style license that can be found in the LICENSE file. | |
| 4 | |
| 5 // Just a dumb test script to validate that the VM flavor works. | |
| 6 | |
| 7 #library('sample'); | |
| 8 | |
| 9 #import('unittest_vm.dart'); | |
| 10 | |
| 11 main() { | |
| 12 group('group 1', () { | |
| 13 test('passing test 1', () { | |
| 14 expect(1).equals(1); | |
| 15 expect(1).equals(1); | |
| 16 }); | |
| 17 | |
| 18 test('failing test 2', () { | |
| 19 expect(1).equals(1); | |
| 20 expect(1).equals(2); | |
| 21 }); | |
| 22 }); | |
| 23 | |
| 24 group('group 2', () { | |
| 25 test('passing test 3', () { | |
| 26 expect(1).equals(1); | |
| 27 expect(1).equals(1); | |
| 28 }); | |
| 29 | |
| 30 test('failing test 4', () { | |
| 31 expect(1).equals(1); | |
| 32 expect(1).equals(2); | |
| 33 }); | |
| 34 }); | |
| 35 | |
| 36 test('ungrouped passing test 5', () { | |
| 37 expect(1).equals(1); | |
| 38 expect(1).equals(1); | |
| 39 }); | |
| 40 | |
| 41 test('ungrouped failing test 5', () { | |
| 42 expect(1).equals(1); | |
| 43 expect(1).equals(2); | |
| 44 }); | |
| 45 } | |
|
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
| |
| OLD | NEW |