OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 import 'package:expect/expect.dart'; | 5 import 'package:expect/expect.dart'; |
6 import 'package:async_helper/async_helper.dart'; | 6 import 'package:async_helper/async_helper.dart'; |
7 import 'package:compiler/src/types/types.dart' | 7 import 'package:compiler/src/types/types.dart' |
8 show ContainerTypeMask, TypeMask; | 8 show ContainerTypeMask, TypeMask; |
9 import 'package:compiler/src/dart2jslib.dart'; | 9 import 'package:compiler/src/compiler.dart'; |
10 | 10 |
11 import 'memory_compiler.dart'; | 11 import 'memory_compiler.dart'; |
12 import 'compiler_helper.dart' show findElement; | 12 import 'compiler_helper.dart' show findElement; |
13 import 'type_mask_test_helper.dart'; | 13 import 'type_mask_test_helper.dart'; |
14 | 14 |
15 const TEST = const { | 15 const TEST = const { |
16 'main.dart' : r''' | 16 'main.dart' : r''' |
17 import 'dart:typed_data'; | 17 import 'dart:typed_data'; |
18 | 18 |
19 var myList = new Float32List(42); | 19 var myList = new Float32List(42); |
(...skipping 17 matching lines...) Expand all Loading... |
37 Expect.isTrue(mask.isContainer); | 37 Expect.isTrue(mask.isContainer); |
38 ContainerTypeMask container = mask; | 38 ContainerTypeMask container = mask; |
39 Expect.equals(type, simplify(container.elementType, compiler), name); | 39 Expect.equals(type, simplify(container.elementType, compiler), name); |
40 Expect.equals(container.length, length); | 40 Expect.equals(container.length, length); |
41 } | 41 } |
42 | 42 |
43 checkType('myList', compiler.typesTask.numType, 42); | 43 checkType('myList', compiler.typesTask.numType, 42); |
44 checkType('myOtherList', compiler.typesTask.uint31Type, 32); | 44 checkType('myOtherList', compiler.typesTask.uint31Type, 32); |
45 }); | 45 }); |
46 } | 46 } |
OLD | NEW |