| Index: pkg/analyzer/test/generated/compile_time_error_code_test.dart
|
| diff --git a/pkg/analyzer/test/generated/compile_time_error_code_test.dart b/pkg/analyzer/test/generated/compile_time_error_code_test.dart
|
| index 35dea2a8f20c4e1499ea673ddb3160f3c3c53184..4b4bf3d125a90c1d87ea0a0a6e63b1a0248873c5 100644
|
| --- a/pkg/analyzer/test/generated/compile_time_error_code_test.dart
|
| +++ b/pkg/analyzer/test/generated/compile_time_error_code_test.dart
|
| @@ -4596,6 +4596,32 @@ f() {
|
| ]);
|
| }
|
|
|
| + void test_nonConstValueInInitializer_assert_condition() {
|
| + resetWithOptions(new AnalysisOptionsImpl()..enableAssertInitializer = true);
|
| + Source source = addSource(r'''
|
| +class A {
|
| + const A(int i) : assert(i.isNegative);
|
| +}''');
|
| + computeLibrarySourceErrors(source);
|
| + assertErrors(
|
| + source, [CompileTimeErrorCode.NON_CONSTANT_VALUE_IN_INITIALIZER]);
|
| + verify([source]);
|
| + }
|
| +
|
| + void test_nonConstValueInInitializer_assert_message() {
|
| + resetWithOptions(new AnalysisOptionsImpl()
|
| + ..enableAssertInitializer = true
|
| + ..enableAssertMessage = true);
|
| + Source source = addSource(r'''
|
| +class A {
|
| + const A(int i) : assert(i < 0, 'isNegative = ${i.isNegative}');
|
| +}''');
|
| + computeLibrarySourceErrors(source);
|
| + assertErrors(
|
| + source, [CompileTimeErrorCode.NON_CONSTANT_VALUE_IN_INITIALIZER]);
|
| + verify([source]);
|
| + }
|
| +
|
| void test_nonConstValueInInitializer_binary_notBool_left() {
|
| Source source = addSource(r'''
|
| class A {
|
|
|