| OLD | NEW |
| 1 // Copyright (c) 2014, the Fletch project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 B { | 7 class B { |
| 8 const B(); | 8 const B(); |
| 9 } | 9 } |
| 10 | 10 |
| 11 class A { | 11 class A { |
| 12 final a = "hej"; | 12 final a = "hej"; |
| 13 final b = const B(); | 13 final b = const B(); |
| 14 final x; | 14 final x; |
| 15 const A(this.x); | 15 const A(this.x); |
| 16 } | 16 } |
| 17 | 17 |
| 18 foo() => "string"; | 18 foo() => "string"; |
| 19 bar() => "string"; | 19 bar() => "string"; |
| 20 | 20 |
| 21 main() { | 21 main() { |
| 22 const x = "x"; | 22 const x = "x"; |
| 23 Expect.isTrue(identical(x, x)); | 23 Expect.isTrue(identical(x, x)); |
| 24 Expect.isTrue(identical(const A(x), const A(x))); | 24 Expect.isTrue(identical(const A(x), const A(x))); |
| 25 Expect.isFalse(identical(const A("x"), const A("y"))); | 25 Expect.isFalse(identical(const A("x"), const A("y"))); |
| 26 Expect.isTrue(identical(const A(1).a, const A(1).a)); | 26 Expect.isTrue(identical(const A(1).a, const A(1).a)); |
| 27 Expect.isTrue(identical(const A("x").b, const A("x").b)); | 27 Expect.isTrue(identical(const A("x").b, const A("x").b)); |
| 28 Expect.isTrue(identical(const A("x").x, const A("x").x)); | 28 Expect.isTrue(identical(const A("x").x, const A("x").x)); |
| 29 Expect.isTrue(identical(foo(), bar())); | 29 Expect.isTrue(identical(foo(), bar())); |
| 30 } | 30 } |
| OLD | NEW |