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

Unified Diff: test/codegen/expect/methods/methods.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/math/math.js ('k') | test/codegen/expect/sunflower/sunflower.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/codegen/expect/methods/methods.js
diff --git a/test/codegen/expect/methods/methods.js b/test/codegen/expect/methods/methods.js
index 02f572bccaf1e853147e99f605dcfbce22b2de56..436bc92b2e7c9b27c37b0cd38d18582e65164192 100644
--- a/test/codegen/expect/methods/methods.js
+++ b/test/codegen/expect/methods/methods.js
@@ -1,55 +1,60 @@
var methods;
-(function (methods) {
+(function(methods) {
'use strict';
class A extends dart.Object {
A() {
this._c = 3;
}
- x() { return 42; }
+ x() {
+ return 42;
+ }
y(a) {
return a;
}
z(b) {
- if (b === undefined) b = null;
- return dart.notNull(b)
+ if (b === void 0)
+ b = null;
+ return dart.notNull(b);
}
zz(b) {
- if (b === undefined) b = 0;
- return b
+ if (b === void 0)
+ b = 0;
+ return b;
}
w(a, opt$) {
- let b = opt$.b === undefined ? null : opt$.b;
+ let b = opt$.b === void 0 ? null : opt$.b;
return dart.notNull(a + dart.notNull(b));
}
ww(a, opt$) {
- let b = opt$.b === undefined ? 0 : opt$.b;
+ let b = opt$.b === void 0 ? 0 : opt$.b;
return a + b;
}
- get a() { return this.x(); }
- set b(b) {
+ get a() {
+ return this.x();
+ }
+ set b(b) {}
+ get c() {
+ return this._c;
}
- get c() { return this._c; }
set c(c) {
this._c = c;
}
}
-
class Bar extends dart.Object {
- call(x) { return core.print(`hello from ${x}`); }
+ call(x) {
+ return core.print(`hello from ${x}`);
+ }
}
-
class Foo extends dart.Object {
Foo() {
this.bar = new Bar();
}
}
-
// Function test: () → dynamic
function test() {
let f = new Foo();
- dart.dinvoke(f, "bar", "Bar's call method!");
+ dart.dinvoke(f, 'bar', "Bar's call method!");
}
-
// Exports:
methods.A = A;
methods.Bar = Bar;
« no previous file with comments | « test/codegen/expect/math/math.js ('k') | test/codegen/expect/sunflower/sunflower.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698