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 dart_sdk = dart_library.import('dart_sdk'); |
7 var collection = dart_library.import('dart/collection'); | 7 var core = dart_sdk.core; |
8 var dart = dart_library.import('dart/_runtime'); | 8 var collection = dart_sdk.collection; |
| 9 var dart = dart_sdk.dart; |
9 var dartx = dart.dartx; | 10 var dartx = dart.dartx; |
10 | 11 |
11 suite('generic', () => { | 12 suite('generic', () => { |
12 "use strict"; | 13 "use strict"; |
13 | 14 |
14 let generic = dart.generic; | 15 let generic = dart.generic; |
15 | 16 |
16 test('zero arguments is not allowed', () => { | 17 test('zero arguments is not allowed', () => { |
17 assert.throws(() => { generic(function(){}); }); | 18 assert.throws(() => { generic(function(){}); }); |
18 }); | 19 }); |
(...skipping 765 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
784 | 785 |
785 suite('primitives', function() { | 786 suite('primitives', function() { |
786 'use strict'; | 787 'use strict'; |
787 | 788 |
788 test('fixed length list', () => { | 789 test('fixed length list', () => { |
789 let list = new core.List(10); | 790 let list = new core.List(10); |
790 list[0] = 42; | 791 list[0] = 42; |
791 assert.throws(() => list.add(42)); | 792 assert.throws(() => list.add(42)); |
792 }); | 793 }); |
793 }); | 794 }); |
OLD | NEW |