| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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"; | |
| 6 import 'compiler_helper.dart'; | 5 import 'compiler_helper.dart'; |
| 7 | 6 |
| 8 const String SOURCE = """ | 7 const String SOURCE = """ |
| 9 class Foo { | 8 class Foo { |
| 10 // Deliberately not const to ensure compile error. | 9 // Deliberately not const to ensure compile error. |
| 11 Foo(_); | 10 Foo(_); |
| 12 } | 11 } |
| 13 | 12 |
| 14 @Bar() | 13 @Bar() |
| 15 class Bar { | 14 class Bar { |
| (...skipping 26 matching lines...) Expand all Loading... |
| 42 'expected exactly two errors, but got ${compiler.errors}'); | 41 'expected exactly two errors, but got ${compiler.errors}'); |
| 43 | 42 |
| 44 Expect.equals(MessageKind.CONSTRUCTOR_IS_NOT_CONST, | 43 Expect.equals(MessageKind.CONSTRUCTOR_IS_NOT_CONST, |
| 45 compiler.errors[0].message.kind); | 44 compiler.errors[0].message.kind); |
| 46 Expect.equals("Foo", compiler.errors[0].node.toString()); | 45 Expect.equals("Foo", compiler.errors[0].node.toString()); |
| 47 | 46 |
| 48 Expect.equals(MessageKind.CONSTRUCTOR_IS_NOT_CONST, | 47 Expect.equals(MessageKind.CONSTRUCTOR_IS_NOT_CONST, |
| 49 compiler.errors[1].message.kind); | 48 compiler.errors[1].message.kind); |
| 50 Expect.equals("Foo", compiler.errors[1].node.toString()); | 49 Expect.equals("Foo", compiler.errors[1].node.toString()); |
| 51 } | 50 } |
| OLD | NEW |