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

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

Issue 2360773003: More kernel_impact. (Closed)
Patch Set: 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
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 5eca98b1f4a7f6fd587d6bcfa5e0667610e4aa6b..2716d53e6bc7430a98b56b80e779ca7a6e0c4f95 100644
--- a/tests/compiler/dart2js/kernel/impact_test.dart
+++ b/tests/compiler/dart2js/kernel/impact_test.dart
@@ -57,15 +57,22 @@ main() {
testIfThenElse();
testTopLevelInvoke();
testTopLevelInvokeTyped();
+ testTopLevelFunctionTyped();
+ testTopLevelFunctionGet();
testTopLevelField();
testTopLevelFieldTyped();
testDynamicInvoke(null);
testDynamicGet(null);
testDynamicSet(null);
+ testLocalWithoutInitializer();
testLocalWithInitializer();
+ testLocalWithInitializerTyped();
testLocalFunction();
+ testLocalFunctionTyped();
testLocalFunctionInvoke();
testLocalFunctionGet();
+ testClosure();
+ testClosureInvoke();
testInvokeIndex(null);
testInvokeIndexSet(null);
testAssert();
@@ -151,6 +158,19 @@ testTopLevelInvokeTyped() {
topLevelFunction3Typed(true, b: [13], c: {'14': true});
topLevelFunction3Typed(false, c: {'16': false}, b: [17]);
}
+
+topLevelFunctionTyped1(void a(num b)) {}
+topLevelFunctionTyped2(void a(num b, [String c])) {}
+topLevelFunctionTyped3(void a(num b, {String c, int d})) {}
+topLevelFunctionTyped4(void a(num b, {String d, int c})) {}
+testTopLevelFunctionTyped() {
+ topLevelFunctionTyped1(null);
+ topLevelFunctionTyped2(null);
+ topLevelFunctionTyped3(null);
+ topLevelFunctionTyped4(null);
+}
+testTopLevelFunctionGet() => topLevelFunction1;
+
var topLevelField;
testTopLevelField() => topLevelField;
int topLevelFieldTyped;
@@ -168,12 +188,21 @@ testDynamicInvoke(o) {
}
testDynamicGet(o) => o.foo;
testDynamicSet(o) => o.foo = 42;
+testLocalWithoutInitializer() {
+ var l;
+}
testLocalWithInitializer() {
var l = 42;
}
+testLocalWithInitializerTyped() {
+ int l = 42;
+}
testLocalFunction() {
localFunction() {}
}
+testLocalFunctionTyped() {
+ int localFunction(String a) => 42;
+}
testLocalFunctionInvoke() {
localFunction() {}
localFunction();
@@ -182,6 +211,12 @@ testLocalFunctionGet() {
localFunction() {}
localFunction;
}
+testClosure() {
+ () {};
+}
+testClosureInvoke() {
+ () {} ();
+}
testInvokeIndex(o) => o[42];
testInvokeIndexSet(o) => o[42] = null;
testAssert() {
« pkg/compiler/lib/src/ssa/kernel_impact.dart ('K') | « 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