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

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

Issue 2936233003: Remove Compiler.mainApp and Compiler.mainFunction (Closed)
Patch Set: 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 // Regression test for dart2js that used to have a bogus 5 // Regression test for dart2js that used to have a bogus
6 // implementation of var.== and 6 // implementation of var.== and
7 // var.hashCode. 7 // var.hashCode.
8 8
9 import 'package:expect/expect.dart'; 9 import 'package:expect/expect.dart';
10 import "package:async_helper/async_helper.dart"; 10 import "package:async_helper/async_helper.dart";
(...skipping 15 matching lines...) Expand all
26 ''', 26 ''',
27 }; 27 };
28 28
29 main() { 29 main() {
30 asyncTest(() async { 30 asyncTest(() async {
31 var result = await runCompiler(memorySourceFiles: MEMORY_SOURCE_FILES); 31 var result = await runCompiler(memorySourceFiles: MEMORY_SOURCE_FILES);
32 var compiler = result.compiler; 32 var compiler = result.compiler;
33 var typesInferrer = compiler.globalInference.typesInferrerInternal; 33 var typesInferrer = compiler.globalInference.typesInferrerInternal;
34 var closedWorld = typesInferrer.closedWorld; 34 var closedWorld = typesInferrer.closedWorld;
35 35
36 var element = compiler.mainApp.find('a'); 36 var element =
37 compiler.frontendStrategy.elementEnvironment.mainLibrary.find('a');
37 var mask1 = typesInferrer.getReturnTypeOfElement(element); 38 var mask1 = typesInferrer.getReturnTypeOfElement(element);
38 39
39 element = compiler.mainApp.find('b'); 40 element =
41 compiler.frontendStrategy.elementEnvironment.mainLibrary.find('b');
40 var mask2 = typesInferrer.getReturnTypeOfElement(element); 42 var mask2 = typesInferrer.getReturnTypeOfElement(element);
41 43
42 element = compiler.mainApp.find('c'); 44 element =
45 compiler.frontendStrategy.elementEnvironment.mainLibrary.find('c');
43 var mask3 = typesInferrer.getReturnTypeOfElement(element); 46 var mask3 = typesInferrer.getReturnTypeOfElement(element);
44 47
45 element = compiler.mainApp.find('d'); 48 element =
49 compiler.frontendStrategy.elementEnvironment.mainLibrary.find('d');
46 var mask4 = typesInferrer.getReturnTypeOfElement(element); 50 var mask4 = typesInferrer.getReturnTypeOfElement(element);
47 51
48 Expect.notEquals( 52 Expect.notEquals(
49 mask1.union(mask2, closedWorld), mask3.union(mask4, closedWorld)); 53 mask1.union(mask2, closedWorld), mask3.union(mask4, closedWorld));
50 }); 54 });
51 } 55 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698