Files
sdk/pkg/analyzer/test/generated/non_error_parser_test.dart
T
Konstantin Shcheglov e5e4677962 CQ. Remove FastaParserTestCase and related.
Tests that used it now go through ParserDiagnosticsTest.

Change-Id: I266f6d9394f005922a984d501ed23f712bacebc0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/486526
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2026-03-10 08:57:00 -07:00

32 lines
1001 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/diagnostics/parser_diagnostics.dart';
main() {
defineReflectiveSuite(() {
defineReflectiveTests(NonErrorParserTest);
});
}
@reflectiveTest
class NonErrorParserTest extends ParserDiagnosticsTest {
void test_annotationOnEnumConstant_first() {
var parseResult = parseStringWithErrors("enum E { @override C }");
parseResult.assertNoErrors();
}
void test_annotationOnEnumConstant_middle() {
var parseResult = parseStringWithErrors("enum E { C, @override D, E }");
parseResult.assertNoErrors();
}
void test_staticMethod_notParsingFunctionBodies() {
var parseResult = parseStringWithErrors('class C { static void m() {} }');
parseResult.assertNoErrors();
}
}