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

Unified Diff: test/codegen/expect/constructors/constructors.js

Issue 949383003: use js_ast instead of strings to generate JS (Closed) Base URL: git@github.com:dart-lang/dart-dev-compiler.git@master
Patch Set: add redirecting ctor test Created 5 years, 10 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 | « test/codegen/expect/collection/collection.js ('k') | test/codegen/expect/convert/convert.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/codegen/expect/constructors/constructors.js
diff --git a/test/codegen/expect/constructors/constructors.js b/test/codegen/expect/constructors/constructors.js
index b89534795f669f7cf32521d6964e70d3224031bd..f009aea3623ab4516571f046c6b7859a294618c0 100644
--- a/test/codegen/expect/constructors/constructors.js
+++ b/test/codegen/expect/constructors/constructors.js
@@ -1,59 +1,51 @@
var constructors;
-(function (constructors) {
+(function(constructors) {
'use strict';
class A extends dart.Object {
}
-
class B extends dart.Object {
B() {
}
}
-
class C extends dart.Object {
C$named() {
}
}
- dart.defineNamedConstructor(C, "named");
-
+ dart.defineNamedConstructor(C, 'named');
class C2 extends C {
C2$named() {
super.C$named();
}
}
- dart.defineNamedConstructor(C2, "named");
-
+ dart.defineNamedConstructor(C2, 'named');
class D extends dart.Object {
D() {
}
D$named() {
}
}
- dart.defineNamedConstructor(D, "named");
-
+ dart.defineNamedConstructor(D, 'named');
class E extends dart.Object {
E(name) {
this.name = name;
}
}
-
class F extends E {
F(name) {
super.E(name);
}
}
-
class G extends dart.Object {
G(p1) {
- if (p1 === undefined) p1 = null;
+ if (p1 === void 0)
+ p1 = null;
}
}
-
class H extends dart.Object {
H(opt$) {
- let p1 = opt$.p1 === undefined ? null : opt$.p1;
+ let p1 = opt$.p1 === void 0 ? null : opt$.p1;
}
}
-
class I extends dart.Object {
I() {
this.name = 'default';
@@ -62,15 +54,13 @@ var constructors;
this.name = name;
}
}
- dart.defineNamedConstructor(I, "named");
-
+ dart.defineNamedConstructor(I, 'named');
class J extends dart.Object {
J() {
this.initialized = true;
this.nonInitialized = null;
}
}
-
class K extends dart.Object {
K() {
this.s = 'a';
@@ -79,34 +69,37 @@ var constructors;
this.s = s;
}
}
- dart.defineNamedConstructor(K, "withS");
-
+ dart.defineNamedConstructor(K, 'withS');
class L extends dart.Object {
L(foo) {
this.foo = foo;
}
}
-
class M extends L {
M$named(x) {
super.L(x + 42);
}
}
- dart.defineNamedConstructor(M, "named");
-
+ dart.defineNamedConstructor(M, 'named');
class N extends M {
N$named(y) {
super.M$named(y + 100);
}
}
- dart.defineNamedConstructor(N, "named");
-
+ dart.defineNamedConstructor(N, 'named');
class P extends N {
P(z) {
super.N$named(z + 9000);
}
+ P$foo(x) {
+ this.P(x + 42);
+ }
+ P$bar() {
+ this.P$foo(1);
+ }
}
-
+ dart.defineNamedConstructor(P, 'foo');
+ dart.defineNamedConstructor(P, 'bar');
// Exports:
constructors.A = A;
constructors.B = B;
« no previous file with comments | « test/codegen/expect/collection/collection.js ('k') | test/codegen/expect/convert/convert.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698