Files
sdk/pkg/analyzer/test/generated/non_error_parser_test.dart
T
Konstantin Shcheglov 3009984866 CQ. Replace many parseStringWithErrors() with parseTestCodeWithDiagnostics().
Change-Id: Id992c63a83bbb8eb2f2539f8735b72ee1c3a2e39
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/504121
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2026-05-20 09:34:54 -07:00

31 lines
982 B
Dart

// Copyright (c) 2020, 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 '../src/dart/resolution/node_text_expectations.dart';
import '../src/diagnostics/parser_diagnostics.dart';
main() {
defineReflectiveSuite(() {
defineReflectiveTests(NonErrorParserTest);
defineReflectiveTests(UpdateNodeTextExpectations);
});
}
@reflectiveTest
class NonErrorParserTest extends ParserDiagnosticsTest {
void test_annotationOnEnumConstant_first() {
parseTestCodeWithDiagnostics("enum E { @override C }");
}
void test_annotationOnEnumConstant_middle() {
parseTestCodeWithDiagnostics("enum E { C, @override D, E }");
}
void test_staticMethod_notParsingFunctionBodies() {
parseTestCodeWithDiagnostics('class C { static void m() {} }');
}
}