mirror of
https://github.com/dart-lang/sdk
synced 2024-11-02 08:44:27 +00:00
test tidying
Follow-up from: https://dart-review.googlesource.com/c/sdk/+/325980 Change-Id: Ie6e8b2ca8d686c9a5c77cb3c2b5964afc581c679 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/326142 Commit-Queue: Phil Quitslund <pquitslund@google.com> Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
This commit is contained in:
parent
f340a23cde
commit
04ad6c22f9
1 changed files with 12 additions and 10 deletions
|
@ -248,7 +248,7 @@ extension on int? {
|
|||
''');
|
||||
}
|
||||
|
||||
test_extensionType_interfaceType_isUsed_typeName_typeArgument() async {
|
||||
test_extensionType_isUsed_typeName_typeArgument() async {
|
||||
await assertNoErrorsInCode(r'''
|
||||
extension type _E(int i) {}
|
||||
|
||||
|
@ -258,14 +258,6 @@ void f() {
|
|||
''');
|
||||
}
|
||||
|
||||
test_extensionType_interfaceType_notUsed() async {
|
||||
await assertErrorsInCode(r'''
|
||||
extension type _E(int i) {}
|
||||
''', [
|
||||
error(WarningCode.UNUSED_ELEMENT, 15, 2),
|
||||
]);
|
||||
}
|
||||
|
||||
test_extensionType_member_notUsed() async {
|
||||
await assertErrorsInCode('''
|
||||
extension type E(int i) {
|
||||
|
@ -276,9 +268,18 @@ extension type E(int i) {
|
|||
]);
|
||||
}
|
||||
|
||||
test_extensionType_notUsed() async {
|
||||
await assertErrorsInCode(r'''
|
||||
extension type _E(int i) {}
|
||||
''', [
|
||||
error(WarningCode.UNUSED_ELEMENT, 15, 2),
|
||||
]);
|
||||
}
|
||||
|
||||
test_extensionType_notUsed_variableDeclaration() async {
|
||||
await assertErrorsInCode('''
|
||||
extension type _E(int i) {}
|
||||
|
||||
void f() {
|
||||
_E? v;
|
||||
print(v);
|
||||
|
@ -291,7 +292,8 @@ void f() {
|
|||
test_extensionType_notUsed_variableDeclaration_typeArgument() async {
|
||||
await assertErrorsInCode('''
|
||||
extension type _E(int i) {}
|
||||
main() {
|
||||
|
||||
void f() {
|
||||
List<_E>? v;
|
||||
print(v);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue