4ebdb31646
This will allow us later switch from applying resolution to parsed AST to directly generating resolved AST, when we get to this. New failing tests are because of absence of annotations, constant values (initializers, default values), and constructor initializers in outlines. We also don't get errors for constant value computing, hence some tests are now passing, but not by the reason we intended to test. R=brianwilkerson@google.com, paulberry@google.com Change-Id: I5b45da592563af02c45e8cda160ccd24487c3591 Reviewed-on: https://dart-review.googlesource.com/61743 Commit-Queue: Konstantin Shcheglov <scheglov@google.com> Reviewed-by: Paul Berry <paulberry@google.com>
75 lines
2.3 KiB
Dart
75 lines
2.3 KiB
Dart
// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
|
|
// for details. All rights reserved. Use of this source code is governed by a
|
|
// BSD-style license that can be found in the LICENSE file.
|
|
|
|
import 'package:test_reflective_loader/test_reflective_loader.dart';
|
|
|
|
import 'error_suppression_driver_test.dart';
|
|
|
|
main() {
|
|
defineReflectiveSuite(() {
|
|
defineReflectiveTests(ErrorSuppressionTest_Kernel);
|
|
});
|
|
}
|
|
|
|
@reflectiveTest
|
|
class ErrorSuppressionTest_Kernel extends ErrorSuppressionTest_Driver {
|
|
@override
|
|
bool get enableKernelDriver => true;
|
|
|
|
@override
|
|
bool get useCFE => true;
|
|
|
|
@override
|
|
@failingTest
|
|
test_error_code_mismatch() async {
|
|
// Expected 1 errors of type StaticTypeWarningCode.INVALID_ASSIGNMENT, found 0;
|
|
// 1 errors of type CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE, found 0
|
|
await super.test_error_code_mismatch();
|
|
}
|
|
|
|
@override
|
|
@failingTest
|
|
test_ignore_first() async {
|
|
// Expected 1 errors of type CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE, found 0
|
|
await super.test_ignore_first();
|
|
}
|
|
|
|
@override
|
|
@failingTest
|
|
test_ignore_first_trailing() async {
|
|
// Expected 1 errors of type CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE, found 0
|
|
await super.test_ignore_first_trailing();
|
|
}
|
|
|
|
@override
|
|
@failingTest
|
|
test_ignore_for_file() async {
|
|
// Expected 1 errors of type CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE, found 0
|
|
await super.test_ignore_for_file();
|
|
}
|
|
|
|
@override
|
|
@failingTest
|
|
test_invalid_error_code() async {
|
|
// Expected 1 errors of type StaticTypeWarningCode.INVALID_ASSIGNMENT, found 0;
|
|
// 1 errors of type CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE, found 0
|
|
await super.test_invalid_error_code();
|
|
}
|
|
|
|
@override
|
|
@failingTest
|
|
test_missing_error_codes() async {
|
|
// UnimplementedError: kernel: (Let) let final dynamic #t1 = #lib1::x in let ...
|
|
await super.test_missing_error_codes();
|
|
}
|
|
|
|
@override
|
|
@failingTest
|
|
test_no_ignores() async {
|
|
// Expected 1 errors of type StaticTypeWarningCode.INVALID_ASSIGNMENT, found 0;
|
|
// 1 errors of type CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE, found 0
|
|
await super.test_no_ignores();
|
|
}
|
|
}
|