OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 | 4 |
5 library test.model_test; | 5 library test.model_test; |
6 | 6 |
7 import 'package:expect/expect.dart'; | 7 import 'package:expect/expect.dart'; |
8 | 8 |
9 import 'model.dart'; | 9 import 'model.dart'; |
10 | 10 |
(...skipping 29 matching lines...) Expand all Loading... |
40 c.accessor = 'baz'; | 40 c.accessor = 'baz'; |
41 | 41 |
42 Expect.equals('foo', accessorA); | 42 Expect.equals('foo', accessorA); |
43 Expect.equals('bar', accessorB); | 43 Expect.equals('bar', accessorB); |
44 Expect.equals('baz', accessorC); | 44 Expect.equals('baz', accessorC); |
45 | 45 |
46 Expect.equals('aMethod', a.aMethod()); | 46 Expect.equals('aMethod', a.aMethod()); |
47 Expect.equals('aMethod', b.aMethod()); | 47 Expect.equals('aMethod', b.aMethod()); |
48 Expect.equals('aMethod', c.aMethod()); | 48 Expect.equals('aMethod', c.aMethod()); |
49 | 49 |
50 Expect.throws(() { a.bMethod(); }, isNoSuchMethodError); | 50 Expect.throws(() { |
| 51 a.bMethod(); |
| 52 }, isNoSuchMethodError); |
51 Expect.equals('bMethod', b.bMethod()); | 53 Expect.equals('bMethod', b.bMethod()); |
52 Expect.equals('bMethod', c.bMethod()); | 54 Expect.equals('bMethod', c.bMethod()); |
53 | 55 |
54 Expect.throws(() { a.cMethod(); }, isNoSuchMethodError); | 56 Expect.throws(() { |
55 Expect.throws(() { b.cMethod(); }, isNoSuchMethodError); | 57 a.cMethod(); |
| 58 }, isNoSuchMethodError); |
| 59 Expect.throws(() { |
| 60 b.cMethod(); |
| 61 }, isNoSuchMethodError); |
56 Expect.equals('cMethod', c.cMethod()); | 62 Expect.equals('cMethod', c.cMethod()); |
57 } | 63 } |
OLD | NEW |