| Index: compiler/javatests/com/google/dart/compiler/backend/js/JsConstructorOptTest.java
|
| diff --git a/compiler/javatests/com/google/dart/compiler/backend/js/JsConstructorOptTest.java b/compiler/javatests/com/google/dart/compiler/backend/js/JsConstructorOptTest.java
|
| index 8855f2cb2005a0a50b08d122d76f0586572628ed..54f8319e253d1768486e7f44b8fe2e30cdc9e93f 100644
|
| --- a/compiler/javatests/com/google/dart/compiler/backend/js/JsConstructorOptTest.java
|
| +++ b/compiler/javatests/com/google/dart/compiler/backend/js/JsConstructorOptTest.java
|
| @@ -12,6 +12,33 @@ import java.io.IOException;
|
| public class JsConstructorOptTest extends ExprOptTest {
|
|
|
| /**
|
| + * When we call implicit "super" constructor we should be able to use non-default constructor with
|
| + * all named (i.e. optional) parameters.
|
| + * <p>
|
| + * http://code.google.com/p/dart/issues/detail?id=801
|
| + */
|
| + public void test_implicitConstructor_defaultValue() throws Exception {
|
| + String js =
|
| + compileSingleUnitSource(
|
| + makeCode(
|
| + "// filler filler filler filler filler filler filler filler filler filler",
|
| + "class SuperClass {",
|
| + " SuperClass([name = 'John']) {",
|
| + " print(name);",
|
| + " }",
|
| + "}",
|
| + "class SubClass extends SuperClass {",
|
| + " SubClass([name = 'Maria']) {",
|
| + " print(name);",
|
| + " }",
|
| + "}",
|
| + ""),
|
| + "SubClass");
|
| + assertTrue(js.contains("Test_app4a54ba$SuperClass$Dart.$Initializer.call(this, 'John');"));
|
| + assertTrue(js.contains("Test_app4a54ba$SuperClass$Dart.$Constructor.call(this, 'John');"));
|
| + }
|
| +
|
| + /**
|
| * Test javascript object creation and inlining of field in the factory body.
|
| */
|
| public void testConstructorOptTest() throws IOException {
|
|
|