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

Side by Side Diff: pkg/dev_compiler/test/browser/runtime_tests.js

Issue 2979353002: implement `Invocation.typeArguments` in DDC (Closed)
Patch Set: fix Created 3 years, 5 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 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 define(['dart_sdk'], function(dart_sdk) { 5 define(['dart_sdk'], function(dart_sdk) {
6 const assert = chai.assert; 6 const assert = chai.assert;
7 const async = dart_sdk.async; 7 const async = dart_sdk.async;
8 const core = dart_sdk.core; 8 const core = dart_sdk.core;
9 const collection = dart_sdk.collection; 9 const collection = dart_sdk.collection;
10 const dart = dart_sdk.dart; 10 const dart = dart_sdk.dart;
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 126
127 test('type constructor is reflectable', () => { 127 test('type constructor is reflectable', () => {
128 let SomeType = generic(function(x, y) { return Object.create(null); }); 128 let SomeType = generic(function(x, y) { return Object.create(null); });
129 let someValue = SomeType('hi', 123); 129 let someValue = SomeType('hi', 123);
130 assert.equal(dart.getGenericClass(someValue), SomeType); 130 assert.equal(dart.getGenericClass(someValue), SomeType);
131 assert.deepEqual(dart.getGenericArgs(someValue), ['hi', 123]); 131 assert.deepEqual(dart.getGenericArgs(someValue), ['hi', 123]);
132 }); 132 });
133 133
134 test('proper type constructor is called', () => { 134 test('proper type constructor is called', () => {
135 // This tests https://github.com/dart-lang/dev_compiler/issues/178 135 // This tests https://github.com/dart-lang/dev_compiler/issues/178
136 let l = dart.list([1, 2, 3], core.int); 136 let l = dart_sdk._interceptors.JSArray$(core.int).of([1, 2, 3]);
137 let s = l[dartx.join](); 137 let s = l[dartx.join]();
138 assert.equal(s, '123'); 138 assert.equal(s, '123');
139 }); 139 });
140 }); 140 });
141 141
142 142
143 suite('instanceOf', () => { 143 suite('instanceOf', () => {
144 "use strict"; 144 "use strict";
145 145
146 setup(() => { 146 setup(() => {
(...skipping 1145 matching lines...) Expand 10 before | Expand all | Expand 10 after
1292 list[0] = 42; 1292 list[0] = 42;
1293 assert.throws(() => list.add(42)); 1293 assert.throws(() => list.add(42));
1294 }); 1294 });
1295 1295
1296 test('toString on ES Symbol', () => { 1296 test('toString on ES Symbol', () => {
1297 let sym = Symbol('_foobar'); 1297 let sym = Symbol('_foobar');
1298 assert.equal(dart.toString(sym), 'Symbol(_foobar)'); 1298 assert.equal(dart.toString(sym), 'Symbol(_foobar)');
1299 }); 1299 });
1300 }); 1300 });
1301 }); 1301 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698