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 import "package:expect/expect.dart"; | 5 import "package:expect/expect.dart"; |
6 | 6 |
7 class Base { | 7 class Base { |
8 int i, j; | 8 var i, j; |
9 Base.ctor1(int i, this.j) : this.i = i + 7; | 9 Base.ctor1(int i, this.j) : this.i = i + 7; |
10 Base.ctor2(int i, this.j) : this.i = i + 8; | 10 Base.ctor2(int i, this.j) : this.i = i + 8; |
11 } | 11 } |
12 | 12 |
13 abstract class M { | 13 abstract class M { |
14 get i; | 14 get i; |
15 get j; | 15 get j; |
16 int k = 42; | 16 int k = 42; |
17 foo() => i + j; | 17 foo() => i + j; |
18 } | 18 } |
(...skipping 11 matching lines...) Expand all Loading... |
30 Expect.equals(42, c1.k); | 30 Expect.equals(42, c1.k); |
31 Expect.equals(131, c1.l); | 31 Expect.equals(131, c1.l); |
32 Expect.equals(21, c1.foo()); | 32 Expect.equals(21, c1.foo()); |
33 C c2 = new C.ctor2(); | 33 C c2 = new C.ctor2(); |
34 Expect.equals(9, c2.i); | 34 Expect.equals(9, c2.i); |
35 Expect.equals(13, c2.j); | 35 Expect.equals(13, c2.j); |
36 Expect.equals(42, c2.k); | 36 Expect.equals(42, c2.k); |
37 Expect.equals(131, c2.l); | 37 Expect.equals(131, c2.l); |
38 Expect.equals(22, c2.foo()); | 38 Expect.equals(22, c2.foo()); |
39 } | 39 } |
OLD | NEW |