| 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 |
| 46 asyncTest('async', 2, () { |
| 47 new Timer((timer) { |
| 48 expect(1).equals(1); |
| 49 callbackDone(); |
| 50 |
| 51 new Timer((timer) { |
| 52 expect(1).equals(1); |
| 53 callbackDone(); |
| 54 }, 10, false); |
| 55 }, 10, false); |
| 56 }); |
| 57 } |
| OLD | NEW |