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_library.import('dart/core'); | 6 var core = dart_library.import('dart/core'); |
7 var collection = dart_library.import('dart/collection'); | 7 var collection = dart_library.import('dart/collection'); |
8 var dart = dart_library.import('dart/_runtime'); | 8 var dart = dart_library.import('dart/_runtime'); |
9 var dartx = dart.dartx; | 9 var dartx = dart.dartx; |
10 | 10 |
11 // TODO(leafp): These are here to test some things not | 11 // TODO(leafp): These are here to test some things not |
12 // currently exposed through the main dart entry point. | 12 // currently exposed through the main dart entry point. |
13 // If we decide to expose them, this can go away. | 13 // If we decide to expose them, this can go away. |
14 var classes = dart_library.import('dart/_classes'); | 14 var classes = dart_library.import('dart/_classes'); |
15 var types = dart_library.import('dart/_types'); | 15 var types = dart_library.import('dart/_types'); |
| 16 var dart_utils = dart_library.import('dart/_utils'); |
16 | 17 |
17 suite('generic', () => { | 18 suite('generic', () => { |
18 "use strict"; | 19 "use strict"; |
19 | 20 |
20 let generic = dart.generic; | 21 let generic = dart.generic; |
21 | 22 |
22 test('zero arguments is not allowed', () => { | 23 test('zero arguments is not allowed', () => { |
23 assert.throws(() => { generic(function(){}); }); | 24 assert.throws(() => { generic(function(){}); }); |
24 }); | 25 }); |
25 | 26 |
(...skipping 750 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
776 | 777 |
777 suite('primitives', function() { | 778 suite('primitives', function() { |
778 'use strict'; | 779 'use strict'; |
779 | 780 |
780 test('fixed length list', () => { | 781 test('fixed length list', () => { |
781 let list = new core.List(10); | 782 let list = new core.List(10); |
782 list[0] = 42; | 783 list[0] = 42; |
783 assert.throws(() => list.add(42)); | 784 assert.throws(() => list.add(42)); |
784 }); | 785 }); |
785 }); | 786 }); |
OLD | NEW |