Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(169)

Unified Diff: tests/compiler/dart2js/kernel/impact_test.dart

Issue 2331923002: Handle signature types and fields in kernel_impact (Closed)
Patch Set: Updated cf. comments. Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/compiler/lib/src/universe/feature.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/kernel/impact_test.dart
diff --git a/tests/compiler/dart2js/kernel/impact_test.dart b/tests/compiler/dart2js/kernel/impact_test.dart
index 0720bca222cd8b3f15effe1a0b711bd37913d67b..f184f21ff577846804794dfc156bfc2cd442be44 100644
--- a/tests/compiler/dart2js/kernel/impact_test.dart
+++ b/tests/compiler/dart2js/kernel/impact_test.dart
@@ -41,6 +41,10 @@ main() {
testUnaryMinus();
testIfThen();
testIfThenElse();
+ testTopLevelInvoke();
+ testTopLevelInvokeTyped();
+ testTopLevelField();
+ testTopLevelFieldTyped();
}
testEmpty() {}
@@ -74,6 +78,40 @@ testIfThenElse() {
return 1;
}
}
+topLevelFunction1(a) {}
+topLevelFunction2(a, [b, c]) {}
+topLevelFunction3(a, {b, c}) {}
+testTopLevelInvoke() {
+ topLevelFunction1(0);
+ topLevelFunction2(1);
+ topLevelFunction2(2, 3);
+ topLevelFunction2(4, 5, 6);
+ topLevelFunction3(7);
+ topLevelFunction3(8, b: 9);
+ topLevelFunction3(10, c: 11);
+ topLevelFunction3(12, b: 13, c: 14);
+ topLevelFunction3(15, c: 16, b: 17);
+}
+void topLevelFunction1Typed(int a) {}
+int topLevelFunction2Typed(String a, [num b, double c]) => null;
+double topLevelFunction3Typed(bool a, {List<int> b, Map<String, bool> c}) {
+ return null;
+}
+testTopLevelInvokeTyped() {
+ topLevelFunction1Typed(0);
+ topLevelFunction2Typed('1');
+ topLevelFunction2Typed('2', 3);
+ topLevelFunction2Typed('3', 5, 6.0);
+ topLevelFunction3Typed(true);
+ topLevelFunction3Typed(false, b: []);
+ topLevelFunction3Typed(null, c: {});
+ topLevelFunction3Typed(true, b: [13], c: {'14': true});
+ topLevelFunction3Typed(false, c: {'16': false}, b: [17]);
+}
+var topLevelField;
+testTopLevelField() => topLevelField;
+int topLevelFieldTyped;
+testTopLevelFieldTyped() => topLevelFieldTyped;
'''
};
« no previous file with comments | « pkg/compiler/lib/src/universe/feature.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698