Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: tests/compiler/dart2js/list_tracer3_test.dart

Issue 2939063002: Strong mode cleaning of many dart2js tests. (Closed)
Patch Set: Use ClassElement. Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 // We used to always nullify the element type of a list we are tracing in 5 // We used to always nullify the element type of a list we are tracing in
6 // the presence of a fixed length list constructor call. 6 // the presence of a fixed length list constructor call.
7 7
8 import 'package:expect/expect.dart'; 8 import 'package:expect/expect.dart';
9 import "package:async_helper/async_helper.dart"; 9 import "package:async_helper/async_helper.dart";
10 import 'package:compiler/src/types/types.dart' show ContainerTypeMask, TypeMask; 10 import 'package:compiler/src/types/types.dart' show ContainerTypeMask;
11 11
12 import 'compiler_helper.dart'; 12 import 'compiler_helper.dart';
13 import 'type_mask_test_helper.dart'; 13 import 'type_mask_test_helper.dart';
14 14
15 const String TEST = r''' 15 const String TEST = r'''
16 var myList = []; 16 var myList = [];
17 var otherList = ['foo', 42]; 17 var otherList = ['foo', 42];
18 main() { 18 main() {
19 var a = otherList[0]; 19 var a = otherList[0];
20 a += 54; 20 a += 54;
(...skipping 12 matching lines...) Expand all
33 var element = findElement(compiler, name); 33 var element = findElement(compiler, name);
34 ContainerTypeMask mask = typesInferrer.getTypeOfElement(element); 34 ContainerTypeMask mask = typesInferrer.getTypeOfElement(element);
35 Expect.equals(type, simplify(mask.elementType, closedWorld), name); 35 Expect.equals(type, simplify(mask.elementType, closedWorld), name);
36 } 36 }
37 37
38 var interceptorType = 38 var interceptorType =
39 typesInferrer.closedWorld.commonMasks.interceptorType; 39 typesInferrer.closedWorld.commonMasks.interceptorType;
40 checkType('myList', interceptorType); 40 checkType('myList', interceptorType);
41 })); 41 }));
42 } 42 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698