| 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 230820ffeb0878add32d7e893fbe4d70e907f7a9..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();
|
| @@ -74,6 +81,10 @@ main() {
|
| testFactoryInvokeGeneric();
|
| testFactoryInvokeGenericRaw();
|
| testFactoryInvokeGenericDynamic();
|
| + testRedirectingFactoryInvoke();
|
| + testRedirectingFactoryInvokeGeneric();
|
| + testRedirectingFactoryInvokeGenericRaw();
|
| + testRedirectingFactoryInvokeGenericDynamic();
|
| }
|
|
|
| testEmpty() {}
|
| @@ -147,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;
|
| @@ -164,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();
|
| @@ -178,6 +211,12 @@ testLocalFunctionGet() {
|
| localFunction() {}
|
| localFunction;
|
| }
|
| +testClosure() {
|
| + () {};
|
| +}
|
| +testClosureInvoke() {
|
| + () {} ();
|
| +}
|
| testInvokeIndex(o) => o[42];
|
| testInvokeIndexSet(o) => o[42] = null;
|
| testAssert() {
|
| @@ -198,13 +237,29 @@ testFactoryInvokeGenericRaw() {
|
| testFactoryInvokeGenericDynamic() {
|
| new GenericClass<dynamic, dynamic>.fact();
|
| }
|
| +testRedirectingFactoryInvoke() {
|
| + new Class.redirect();
|
| +}
|
| +testRedirectingFactoryInvokeGeneric() {
|
| + new GenericClass<int, String>.redirect();
|
| +}
|
| +testRedirectingFactoryInvokeGenericRaw() {
|
| + new GenericClass.redirect();
|
| +}
|
| +testRedirectingFactoryInvokeGenericDynamic() {
|
| + new GenericClass<dynamic, dynamic>.redirect();
|
| +}
|
| ''',
|
| 'helper.dart': '''
|
| class Class {
|
| + Class.generative();
|
| factory Class.fact() => null;
|
| + factory Class.redirect() = Class.generative;
|
| }
|
| class GenericClass<X, Y> {
|
| + GenericClass.generative();
|
| factory GenericClass.fact() => null;
|
| + factory GenericClass.redirect() = GenericClass.generative;
|
| }
|
| ''',
|
| };
|
|
|