e5e4677962
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>
32 lines
1001 B
Dart
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();
|
|
}
|
|
}
|