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

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

Issue 690103004: Move dart2js from sdk/lib/_internal/compiler to pkg/compiler (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 1 month 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 'dart:async'; 5 import 'dart:async';
6 import 'package:compiler/implementation/apiimpl.dart'; 6 import 'package:compiler/src/apiimpl.dart';
7 import 'package:compiler/implementation/dart2jslib.dart' show NullSink; 7 import 'package:compiler/src/dart2jslib.dart' show NullSink;
8 import 'package:expect/expect.dart'; 8 import 'package:expect/expect.dart';
9 import 'package:compiler/implementation/filenames.dart'; 9 import 'package:compiler/src/filenames.dart';
10 import 'package:compiler/implementation/source_file_provider.dart'; 10 import 'package:compiler/src/source_file_provider.dart';
11 import 'package:compiler/implementation/elements/elements.dart' 11 import 'package:compiler/src/elements/elements.dart'
12 show ClassElement; 12 show ClassElement;
13 import 'package:compiler/implementation/resolution/class_members.dart' 13 import 'package:compiler/src/resolution/class_members.dart'
14 show ClassMemberMixin; 14 show ClassMemberMixin;
15 import "package:async_helper/async_helper.dart"; 15 import "package:async_helper/async_helper.dart";
16 16
17 17
18 const String DART2JS_SOURCE = 18 const String DART2JS_SOURCE =
19 'sdk/lib/_internal/compiler/implementation/dart2js.dart'; 19 'pkg/compiler/lib/src/dart2js.dart';
20 const List<String> DART2JS_OPTIONS = const <String>[ 20 const List<String> DART2JS_OPTIONS = const <String>[
21 '--categories=Client,Server', 21 '--categories=Client,Server',
22 '--disable-type-inference' 22 '--disable-type-inference'
23 ]; 23 ];
24 24
25 Iterable<ClassElement> computeLiveClasses(Compiler compiler) { 25 Iterable<ClassElement> computeLiveClasses(Compiler compiler) {
26 return new Set<ClassElement>() 26 return new Set<ClassElement>()
27 ..addAll(compiler.resolverWorld.instantiatedClasses) 27 ..addAll(compiler.resolverWorld.instantiatedClasses)
28 ..addAll(compiler.codegenWorld.instantiatedClasses); 28 ..addAll(compiler.codegenWorld.instantiatedClasses);
29 } 29 }
30 30
31 void checkClassInvariants(ClassElement cls) { 31 void checkClassInvariants(ClassElement cls) {
(...skipping 17 matching lines...) Expand all
49 Expect.isTrue(passed, "Compilation of dart2js failed."); 49 Expect.isTrue(passed, "Compilation of dart2js failed.");
50 50
51 computeLiveClasses(compiler).forEach(checkClassInvariants); 51 computeLiveClasses(compiler).forEach(checkClassInvariants);
52 }); 52 });
53 } 53 }
54 54
55 void main () { 55 void main () {
56 var uri = currentDirectory.resolve(DART2JS_SOURCE); 56 var uri = currentDirectory.resolve(DART2JS_SOURCE);
57 asyncTest(() => checkElementInvariantsAfterCompiling(uri)); 57 asyncTest(() => checkElementInvariantsAfterCompiling(uri));
58 } 58 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/call_site_simple_type_inferer_test.dart ('k') | tests/compiler/dart2js/command_line_split_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698