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 var a = 42; | 8 var a = 42; |
9 var b = "I'm soooo A"; | 9 var b = "I'm soooo A"; |
10 var y; | 10 var y; |
11 A(int x, this.y) { | 11 A(int x, this.y) { |
12 Expect.equals(5, x); | 12 Expect.equals(5, x); |
13 } | 13 } |
14 toString() => b; | 14 toString() => b; |
15 get z => 8; | 15 get z => 8; |
16 } | 16 } |
17 | 17 |
18 main() { | 18 main() { |
19 var a = new A(5, 7); | 19 var a = new A(5, 7); |
20 Expect.equals("I'm soooo A", a.toString()); | 20 Expect.equals("I'm soooo A", a.toString()); |
21 Expect.equals(42, a.a); | 21 Expect.equals(42, a.a); |
22 Expect.equals(7, a.y); | 22 Expect.equals(7, a.y); |
23 Expect.equals(8, a.z); | 23 Expect.equals(8, a.z); |
24 } | 24 } |
OLD | NEW |