OLD | NEW |
1 // Copyright (c) 2015, the Fletch project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dartino 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.md file. | 3 // BSD-style license that can be found in the LICENSE.md file. |
4 | 4 |
5 import 'package:expect/expect.dart'; | 5 import 'package:expect/expect.dart'; |
6 | 6 |
7 class A { | 7 class A { |
8 static int s = 3; | 8 static int s = 3; |
9 | 9 |
10 int f = 2; | 10 int f = 2; |
11 A(); | 11 A(); |
12 } | 12 } |
13 | 13 |
14 | 14 |
15 void main() { | 15 void main() { |
16 var i = 4; | 16 var i = 4; |
17 i += 5; | 17 i += 5; |
18 Expect.equals(9, i); | 18 Expect.equals(9, i); |
19 A.s += 4; | 19 A.s += 4; |
20 Expect.equals(7, A.s); | 20 Expect.equals(7, A.s); |
21 A a = new A(); | 21 A a = new A(); |
22 a.f += 1; | 22 a.f += 1; |
23 Expect.equals(3, a.f); | 23 Expect.equals(3, a.f); |
24 } | 24 } |
OLD | NEW |