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

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

Issue 2964683003: Split implementation of KernelToElementMapImpl (Closed)
Patch Set: Updated cf. comments Created 3 years, 5 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
(Empty)
1 // Copyright (c) 2017, 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 checks that we are not added $isFunction properties on closure
6 /// classes.
7
8 import 'package:async_helper/async_helper.dart';
9 import 'package:compiler/src/commandline_options.dart';
10 import 'package:compiler/src/compiler.dart';
11 import 'package:compiler/src/js_emitter/model.dart';
12 import 'package:expect/expect.dart';
13 import 'memory_compiler.dart';
14
15 const String SOURCE = '''
16 import 'dart:isolate';
17 main(arg) {}
18 ''';
19
20 main() {
21 asyncTest(() async {
22 var result = await runCompiler(
23 memorySourceFiles: {'main.dart': SOURCE},
24 options: [Flags.enableCheckedMode]);
25 Expect.isTrue(result.isSuccess);
26 Compiler compiler = result.compiler;
27 Program program = compiler.backend.emitter.emitter.programForTesting;
28 var name = compiler.backend.namer
29 .operatorIs(compiler.frontendStrategy.commonElements.functionClass);
30 for (Fragment fragment in program.fragments) {
31 for (Library library in fragment.libraries) {
32 for (Class cls in library.classes) {
33 if (!cls.element.isClosure) continue;
34 for (StubMethod stub in cls.isChecks) {
35 Expect.notEquals(
36 stub.name.key, name.key, "Unexpected ${name.key} stub on $cls");
37 }
38 }
39 }
40 }
41 });
42 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/universe/resolution_world_builder.dart ('k') | tests/compiler/dart2js/js_model/model_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698