Skip to content

Commit c8c3572

Browse files
stereotype441commit-bot@chromium.org
authored andcommitted
Migration: standardize method names in EdgeBuilderTest.
Two methods had names beginning with "visit", to reflect the name of the visitor method they tested. But this was inconsistent with the rest of the methods in EdgeBuilderTest, which are simply named after the structure whose visitor method they test. Change-Id: I4616eeff959f4ef84fc8a5da3263ab9c88d8fba2 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107742 Reviewed-by: Brian Wilkerson <[email protected]>
1 parent c0c15c1 commit c8c3572

1 file changed

Lines changed: 26 additions & 26 deletions

File tree

‎pkg/nnbd_migration/test/edge_builder_test.dart‎

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -897,6 +897,32 @@ void g(int k) {
897897
assertEdge(decoratedTypeAnnotation('int k').node, never, hard: true);
898898
}
899899

900+
test_functionExpressionInvocation_parameterType() async {
901+
await analyze('''
902+
abstract class C {
903+
void Function(int) f();
904+
}
905+
void g(C c, int i) {
906+
c.f()(i);
907+
}
908+
''');
909+
assertEdge(decoratedTypeAnnotation('int i').node,
910+
decoratedTypeAnnotation('int)').node,
911+
hard: true);
912+
}
913+
914+
test_functionExpressionInvocation_returnType() async {
915+
await analyze('''
916+
abstract class C {
917+
int Function() f();
918+
}
919+
int g(C c) => c.f()();
920+
''');
921+
assertEdge(decoratedTypeAnnotation('int Function').node,
922+
decoratedTypeAnnotation('int g').node,
923+
hard: false);
924+
}
925+
900926
test_functionInvocation_parameter_fromLocalParameter() async {
901927
await analyze('''
902928
void f(int/*1*/ i) {}
@@ -2450,30 +2476,4 @@ void f(int i) {
24502476
decoratedTypeAnnotation('int j').node,
24512477
hard: true);
24522478
}
2453-
2454-
test_visitFunctionExpressionInvocation_parameterType() async {
2455-
await analyze('''
2456-
abstract class C {
2457-
void Function(int) f();
2458-
}
2459-
void g(C c, int i) {
2460-
c.f()(i);
2461-
}
2462-
''');
2463-
assertEdge(decoratedTypeAnnotation('int i').node,
2464-
decoratedTypeAnnotation('int)').node,
2465-
hard: true);
2466-
}
2467-
2468-
test_visitFunctionExpressionInvocation_returnType() async {
2469-
await analyze('''
2470-
abstract class C {
2471-
int Function() f();
2472-
}
2473-
int g(C c) => c.f()();
2474-
''');
2475-
assertEdge(decoratedTypeAnnotation('int Function').node,
2476-
decoratedTypeAnnotation('int g').node,
2477-
hard: false);
2478-
}
24792479
}

0 commit comments

Comments
 (0)