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

Side by Side Diff: test/codegen/expect/cascade.js

Issue 1178523004: fixes #215, removes special case for length (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 6 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 unified diff | Download patch
OLDNEW
1 dart.library('cascade', null, /* Imports */[ 1 dart.library('cascade', null, /* Imports */[
2 'dart/core' 2 'dart/core'
3 ], /* Lazy imports */[ 3 ], /* Lazy imports */[
4 ], function(exports, core) { 4 ], function(exports, core) {
5 'use strict'; 5 'use strict';
6 class A extends core.Object { 6 class A extends core.Object {
7 A() { 7 A() {
8 this.x = null; 8 this.x = null;
9 } 9 }
10 } 10 }
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 let a = null, b = null; 43 let a = null, b = null;
44 a = new A(); 44 a = new A();
45 a.x = b = null; 45 a.x = b = null;
46 a.x = b = null; 46 a.x = b = null;
47 a = null; 47 a = null;
48 core.print(a); 48 core.print(a);
49 } 49 }
50 dart.fn(test_mutate_outside_cascade, dart.void, []); 50 dart.fn(test_mutate_outside_cascade, dart.void, []);
51 function test_VariableDeclaration_single() { 51 function test_VariableDeclaration_single() {
52 let a = []; 52 let a = [];
53 a.length = 2; 53 a[dartx.length] = 2;
54 a[dartx.add](42); 54 a[dartx.add](42);
55 core.print(a); 55 core.print(a);
56 } 56 }
57 dart.fn(test_VariableDeclaration_single, dart.void, []); 57 dart.fn(test_VariableDeclaration_single, dart.void, []);
58 function test_VariableDeclaration_last() { 58 function test_VariableDeclaration_last() {
59 let a = 42, b = (() => { 59 let a = 42, b = (() => {
60 let _ = []; 60 let _ = [];
61 _.length = 2; 61 _[dartx.length] = 2;
62 _[dartx.add](a); 62 _[dartx.add](a);
63 return _; 63 return _;
64 })(); 64 })();
65 core.print(b); 65 core.print(b);
66 } 66 }
67 dart.fn(test_VariableDeclaration_last, dart.void, []); 67 dart.fn(test_VariableDeclaration_last, dart.void, []);
68 function test_VariableDeclaration_first() { 68 function test_VariableDeclaration_first() {
69 let a = (() => { 69 let a = (() => {
70 let _ = []; 70 let _ = [];
71 _.length = 2; 71 _[dartx.length] = 2;
72 _[dartx.add](3); 72 _[dartx.add](3);
73 return _; 73 return _;
74 })(), b = 2; 74 })(), b = 2;
75 core.print(a); 75 core.print(a);
76 } 76 }
77 dart.fn(test_VariableDeclaration_first, dart.void, []); 77 dart.fn(test_VariableDeclaration_first, dart.void, []);
78 function test_increment() { 78 function test_increment() {
79 let a = new A(); 79 let a = new A();
80 let y = ((() => { 80 let y = ((() => {
81 a.x = dart.dsend(a.x, '+', 1); 81 a.x = dart.dsend(a.x, '+', 1);
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 exports.test_mutate_inside_cascade = test_mutate_inside_cascade; 114 exports.test_mutate_inside_cascade = test_mutate_inside_cascade;
115 exports.test_mutate_outside_cascade = test_mutate_outside_cascade; 115 exports.test_mutate_outside_cascade = test_mutate_outside_cascade;
116 exports.test_VariableDeclaration_single = test_VariableDeclaration_single; 116 exports.test_VariableDeclaration_single = test_VariableDeclaration_single;
117 exports.test_VariableDeclaration_last = test_VariableDeclaration_last; 117 exports.test_VariableDeclaration_last = test_VariableDeclaration_last;
118 exports.test_VariableDeclaration_first = test_VariableDeclaration_first; 118 exports.test_VariableDeclaration_first = test_VariableDeclaration_first;
119 exports.test_increment = test_increment; 119 exports.test_increment = test_increment;
120 exports.Base$ = Base$; 120 exports.Base$ = Base$;
121 exports.Base = Base; 121 exports.Base = Base;
122 exports.Foo = Foo; 122 exports.Foo = Foo;
123 }); 123 });
OLDNEW
« lib/src/codegen/js_codegen.dart ('K') | « test/codegen/expect/DeltaBlue.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698