| 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 #library('total_dartest'); | |
| 6 | |
| 7 #import('dart:html'); | |
| 8 #import('../../../../base/base.dart'); | |
| 9 #import('../../../../samples/total/src/TotalLib.dart'); | |
| 10 #import('../../../../testing/unittest/unittest_dartest.dart'); | |
| 11 #import('../../../../testing/dartest/dartest.dart'); | |
| 12 #import('../../../../view/view.dart'); | |
| 13 #source('../../../../../samples/total/src/SYLKProducer.dart'); | |
| 14 #source('total_test_lib.dart'); | |
| 15 | |
| 16 fakeTests() { | |
| 17 group('Failing Tests::', () { | |
| 18 test('Int Test', () { | |
| 19 Expect.equals(1,2); | |
| 20 }); | |
| 21 | |
| 22 test('String Test', () { | |
| 23 Expect.equals(""," "); | |
| 24 }); | |
| 25 | |
| 26 test('Divide by Zero', (){ | |
| 27 Expect.equals(0, 1/0); | |
| 28 }); | |
| 29 }); | |
| 30 | |
| 31 group('Errorneous Tests::' , () { | |
| 32 test('IndexOutOfRange', (){ | |
| 33 List<int> intList = new List<int>(); | |
| 34 Expect.equals(0, intList[0]); | |
| 35 }); | |
| 36 | |
| 37 test('NullPointer', (){ | |
| 38 List<int> intList; | |
| 39 Expect.equals(0, intList.length); | |
| 40 }); | |
| 41 }); | |
| 42 } | |
| 43 | |
| 44 main() { | |
| 45 | |
| 46 // Run the Application | |
| 47 new Total().run(); | |
| 48 | |
| 49 // Load the tests | |
| 50 totalTests(); | |
| 51 | |
| 52 fakeTests(); | |
| 53 | |
| 54 // Run DARTest | |
| 55 new DARTest().run(); | |
| 56 | |
| 57 } | |
| OLD | NEW |