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/minimal_resolution_test.dart

Issue 1334203002: Compute Compiler.proxyConstant on demand. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comment Created 5 years, 3 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
« no previous file with comments | « pkg/compiler/lib/src/ssa/optimize.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // BSD-style license that can be found in the LICENSE file.
4
5 // Test that elements are not needlessly required by dart2js.
6
7 import 'package:async_helper/async_helper.dart';
8 import 'package:compiler/src/compiler.dart';
9 import 'package:expect/expect.dart';
10 import 'memory_compiler.dart';
11
12 main() {
13 asyncTest(() async {
14 await analyze('main() {}');
15 await analyze('main() => proxy;', proxyConstant: true);
16 });
17 }
18
19 analyze(String code,
20 {bool proxyConstant: false}) async {
21 CompilationResult result = await runCompiler(
22 memorySourceFiles: {'main.dart': code},
23 options: ['--analyze-only']);
24 Expect.isTrue(result.isSuccess);
25 Compiler compiler = result.compiler;
26 Expect.equals(proxyConstant, compiler.proxyConstant != null);
27 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/ssa/optimize.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698