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

Side by Side Diff: tests/compiler/dart2js/backend_dart/dart_backend_test.dart

Issue 824103005: Revert "Remove Compiler.assembledCode." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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:expect/expect.dart"; 5 import "package:expect/expect.dart";
6 import 'dart:async'; 6 import 'dart:async';
7 import "package:async_helper/async_helper.dart"; 7 import "package:async_helper/async_helper.dart";
8 import '../mock_compiler.dart'; 8 import '../mock_compiler.dart';
9 import '../mock_libraries.dart'; 9 import '../mock_libraries.dart';
10 import '../output_collector.dart';
11 import 'package:compiler/compiler.dart'; 10 import 'package:compiler/compiler.dart';
12 import 'package:compiler/src/dart2jslib.dart' as leg; 11 import 'package:compiler/src/dart2jslib.dart' as leg;
13 import 'package:compiler/src/dart_backend/dart_backend.dart'; 12 import 'package:compiler/src/dart_backend/dart_backend.dart';
14 import 'package:compiler/src/elements/elements.dart'; 13 import 'package:compiler/src/elements/elements.dart';
15 import 'package:compiler/src/tree/tree.dart'; 14 import 'package:compiler/src/tree/tree.dart';
16 15
17 const ioLib = r''' 16 const ioLib = r'''
18 library io; 17 library io;
19 class Platform { 18 class Platform {
20 static int operatingSystem; 19 static int operatingSystem;
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 } 84 }
86 } 85 }
87 86
88 final options = <String>['--output-type=dart']; 87 final options = <String>['--output-type=dart'];
89 // Some tests below are using dart:io. 88 // Some tests below are using dart:io.
90 options.add('--categories=Client,Server'); 89 options.add('--categories=Client,Server');
91 if (minify) options.add('--minify'); 90 if (minify) options.add('--minify');
92 if (stripTypes) options.add('--force-strip=types'); 91 if (stripTypes) options.add('--force-strip=types');
93 92
94 asyncTest(() { 93 asyncTest(() {
95 OutputCollector outputCollector = new OutputCollector();
96 return compile( 94 return compile(
97 scriptUri, 95 scriptUri,
98 fileUri('libraryRoot/'), 96 fileUri('libraryRoot/'),
99 fileUri('packageRoot/'), 97 fileUri('packageRoot/'),
100 provider, 98 provider,
101 handler, 99 handler,
102 options, 100 options).then((s) {
103 outputCollector).then((_) { 101 Expect.equals(expectedResult, s,
104 String code = outputCollector.getOutput('', 'dart'); 102 'expected:\n$expectedResult\nactual:\n$s');
105 Expect.equals(expectedResult, code,
106 'expected:\n$expectedResult\nactual:\n$code');
107 }); 103 });
108 }); 104 });
109 } 105 }
110 106
111 testSimpleFileUnparse() { 107 testSimpleFileUnparse() {
112 final src = ''' 108 final src = '''
113 should_be_dropped() { 109 should_be_dropped() {
114 } 110 }
115 111
116 should_be_kept() { 112 should_be_kept() {
(...skipping 990 matching lines...) Expand 10 before | Expand all | Expand 10 after
1107 testParametersMinified(); 1103 testParametersMinified();
1108 testDeclarationTypePlaceholders(); 1104 testDeclarationTypePlaceholders();
1109 testPlatformLibraryMemberNamesAreFixed(); 1105 testPlatformLibraryMemberNamesAreFixed();
1110 testConflictsWithCoreLib(); 1106 testConflictsWithCoreLib();
1111 testUnresolvedNamedConstructor1(); 1107 testUnresolvedNamedConstructor1();
1112 testUnresolvedNamedConstructor2(); 1108 testUnresolvedNamedConstructor2();
1113 testUnresolvedNamedConstructor3(); 1109 testUnresolvedNamedConstructor3();
1114 testClassAndNamedMixinDeclarations(); 1110 testClassAndNamedMixinDeclarations();
1115 } 1111 }
1116 1112
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/analyze_only_test.dart ('k') | tests/compiler/dart2js/backend_dart/dart_new_backend_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698