| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 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 | 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. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 // Testing the Expect class. | 4 // Testing the Expect class. |
| 5 | 5 |
| 6 import "package:expect/expect.dart"; |
| 7 |
| 6 class ExpectTest { | 8 class ExpectTest { |
| 7 | 9 |
| 8 static testEquals(a) { | 10 static testEquals(a) { |
| 9 try { | 11 try { |
| 10 Expect.equals("AB", a, "within testEquals"); | 12 Expect.equals("AB", a, "within testEquals"); |
| 11 } on Exception catch (msg) { | 13 } on Exception catch (msg) { |
| 12 print(msg); | 14 print(msg); |
| 13 return; | 15 return; |
| 14 } | 16 } |
| 15 Expect.equals("AB", "${a}B"); | 17 Expect.equals("AB", "${a}B"); |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 testIsFalse(0); | 70 testIsFalse(0); |
| 69 testIdentical("A"); | 71 testIdentical("A"); |
| 70 testFail(); | 72 testFail(); |
| 71 } | 73 } |
| 72 | 74 |
| 73 } | 75 } |
| 74 | 76 |
| 75 main() { | 77 main() { |
| 76 ExpectTest.testMain(); | 78 ExpectTest.testMain(); |
| 77 } | 79 } |
| OLD | NEW |