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 var assert = chai.assert; | 5 var assert = chai.assert; |
| 6 var core = dart.import('dart/core'); |
| 7 var collection = dart.import('dart/collection'); |
6 | 8 |
7 suite('generic', () => { | 9 suite('generic', () => { |
8 "use strict"; | 10 "use strict"; |
9 | 11 |
10 let generic = dart.generic; | 12 let generic = dart.generic; |
11 | 13 |
12 test('zero arguments is not allowed', () => { | 14 test('zero arguments is not allowed', () => { |
13 assert.throws(() => { generic(function(){}); }); | 15 assert.throws(() => { generic(function(){}); }); |
14 }); | 16 }); |
15 | 17 |
(...skipping 686 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
702 | 704 |
703 suite('primitives', function() { | 705 suite('primitives', function() { |
704 'use strict'; | 706 'use strict'; |
705 | 707 |
706 test('fixed length list', () => { | 708 test('fixed length list', () => { |
707 let list = new core.List(10); | 709 let list = new core.List(10); |
708 list[0] = 42; | 710 list[0] = 42; |
709 assert.throws(() => list.add(42)); | 711 assert.throws(() => list.add(42)); |
710 }); | 712 }); |
711 }); | 713 }); |
OLD | NEW |