| OLD | NEW |
| 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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 let l = dart.list([1, 2, 3], core.int); | 136 let l = dart.list([1, 2, 3], core.int); |
| 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(() => { |
| 147 dart_sdk.dart.failForWeakModeIsChecks(true); |
| 148 }); |
| 149 |
| 150 teardown(() => { |
| 151 dart_sdk.dart.failForWeakModeIsChecks(false); |
| 152 }); |
| 153 |
| 146 let expect = assert.equal; | 154 let expect = assert.equal; |
| 147 let isGroundType = dart.isGroundType; | 155 let isGroundType = dart.isGroundType; |
| 148 let generic = dart.generic; | 156 let generic = dart.generic; |
| 149 let intIsNonNullable = false; | 157 let intIsNonNullable = false; |
| 150 let cast = dart.as; | 158 let cast = dart.as; |
| 151 let instanceOf = dart.is; | 159 let instanceOf = dart.is; |
| 152 let strongInstanceOf = dart.strongInstanceOf; | 160 let strongInstanceOf = dart.strongInstanceOf; |
| 153 let getReifiedType = dart.getReifiedType; | 161 let getReifiedType = dart.getReifiedType; |
| 154 let functionType = dart.functionType; | 162 let functionType = dart.functionType; |
| 155 let typedef = dart.typedef; | 163 let typedef = dart.typedef; |
| (...skipping 1114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1270 list[0] = 42; | 1278 list[0] = 42; |
| 1271 assert.throws(() => list.add(42)); | 1279 assert.throws(() => list.add(42)); |
| 1272 }); | 1280 }); |
| 1273 | 1281 |
| 1274 test('toString on ES Symbol', () => { | 1282 test('toString on ES Symbol', () => { |
| 1275 let sym = Symbol('_foobar'); | 1283 let sym = Symbol('_foobar'); |
| 1276 assert.equal(dart.toString(sym), 'Symbol(_foobar)'); | 1284 assert.equal(dart.toString(sym), 'Symbol(_foobar)'); |
| 1277 }); | 1285 }); |
| 1278 }); | 1286 }); |
| 1279 }); | 1287 }); |
| OLD | NEW |