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

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

Issue 2625713002: Rename Enqueuer.universe to worldBuilder. (Closed)
Patch Set: Updated cf. comments Created 3 years, 11 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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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:async_helper/async_helper.dart'; 5 import 'package:async_helper/async_helper.dart';
6 import 'package:compiler/src/commandline_options.dart'; 6 import 'package:compiler/src/commandline_options.dart';
7 import 'package:compiler/src/compiler.dart'; 7 import 'package:compiler/src/compiler.dart';
8 import 'package:compiler/src/elements/elements.dart'; 8 import 'package:compiler/src/elements/elements.dart';
9 import 'package:compiler/src/types/masks.dart'; 9 import 'package:compiler/src/types/masks.dart';
10 import 'package:compiler/src/world.dart' show ClosedWorld; 10 import 'package:compiler/src/world.dart' show ClosedWorld;
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 } 52 }
53 '''; 53 ''';
54 54
55 main() { 55 main() {
56 asyncTest(() async { 56 asyncTest(() async {
57 CompilationResult result = await runCompiler( 57 CompilationResult result = await runCompiler(
58 entryPoint: Uri.parse('memory:main.dart'), 58 entryPoint: Uri.parse('memory:main.dart'),
59 memorySourceFiles: {'main.dart': SOURCE}, 59 memorySourceFiles: {'main.dart': SOURCE},
60 options: [Flags.enableCheckedMode, Flags.enableAssertMessage]); 60 options: [Flags.enableCheckedMode, Flags.enableAssertMessage]);
61 Compiler compiler = result.compiler; 61 Compiler compiler = result.compiler;
62 ClosedWorld closedWorld = compiler.resolverWorld.closedWorldForTesting; 62 ClosedWorld closedWorld =
63 compiler.resolutionWorldBuilder.closedWorldForTesting;
63 64
64 void check(String methodName, TypeMask expectedReturnType) { 65 void check(String methodName, TypeMask expectedReturnType) {
65 Element element = compiler.mainApp.find(methodName); 66 Element element = compiler.mainApp.find(methodName);
66 TypeMask typeMask = simplify( 67 TypeMask typeMask = simplify(
67 compiler.globalInference.results.resultOf(element).returnType, 68 compiler.globalInference.results.resultOf(element).returnType,
68 closedWorld); 69 closedWorld);
69 Expect.equals(expectedReturnType, typeMask, 70 Expect.equals(expectedReturnType, typeMask,
70 "Unexpected return type on method '$methodName'."); 71 "Unexpected return type on method '$methodName'.");
71 } 72 }
72 73
73 check('test0', closedWorld.commonMasks.growableListType); 74 check('test0', closedWorld.commonMasks.growableListType);
74 check('test1', closedWorld.commonMasks.nullType); 75 check('test1', closedWorld.commonMasks.nullType);
75 check('test2', closedWorld.commonMasks.uint31Type.nullable()); 76 check('test2', closedWorld.commonMasks.uint31Type.nullable());
76 check('test3', closedWorld.commonMasks.intType); 77 check('test3', closedWorld.commonMasks.intType);
77 }); 78 });
78 } 79 }
OLDNEW
« no previous file with comments | « pkg/dart2js_incremental/lib/caching_compiler.dart ('k') | tests/compiler/dart2js/check_elements_invariants_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698