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

Side by Side Diff: tests/compiler/dart2js/kernel/compile_from_dill_test.dart

Issue 2958553002: Sort type tests. (Closed)
Patch Set: Updated cf. comment 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
« no previous file with comments | « pkg/compiler/lib/src/js_emitter/runtime_type_generator.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
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file 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 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 // Partial test that the closed world computed from [WorldImpact]s derived from 5 // Partial test that the closed world computed from [WorldImpact]s derived from
6 // kernel is equivalent to the original computed from resolution. 6 // kernel is equivalent to the original computed from resolution.
7 library dart2js.kernel.compile_from_dill_test; 7 library dart2js.kernel.compile_from_dill_test;
8 8
9 import 'dart:async'; 9 import 'dart:async';
10 import 'dart:io'; 10 import 'dart:io';
11 11
12 import 'package:async_helper/async_helper.dart'; 12 import 'package:async_helper/async_helper.dart';
13 import 'package:compiler/compiler_new.dart'; 13 import 'package:compiler/compiler_new.dart';
14 import 'package:compiler/src/commandline_options.dart'; 14 import 'package:compiler/src/commandline_options.dart';
15 import 'package:compiler/src/common.dart'; 15 import 'package:compiler/src/common.dart';
16 import 'package:compiler/src/compiler.dart'; 16 import 'package:compiler/src/compiler.dart';
17 import 'package:compiler/src/elements/elements.dart';
17 import 'package:compiler/src/elements/types.dart'; 18 import 'package:compiler/src/elements/types.dart';
18 import 'package:compiler/src/kernel/element_map.dart'; 19 import 'package:compiler/src/kernel/element_map.dart';
19 import 'package:compiler/src/kernel/kernel_strategy.dart'; 20 import 'package:compiler/src/kernel/kernel_strategy.dart';
20 import 'package:compiler/src/serialization/equivalence.dart'; 21 import 'package:compiler/src/serialization/equivalence.dart';
21 import 'package:compiler/src/resolution/enum_creator.dart'; 22 import 'package:compiler/src/resolution/enum_creator.dart';
22 import 'package:compiler/src/universe/world_builder.dart'; 23 import 'package:compiler/src/universe/world_builder.dart';
23 import 'package:compiler/src/world.dart'; 24 import 'package:compiler/src/world.dart';
24 import 'package:expect/expect.dart'; 25 import 'package:expect/expect.dart';
25 import '../memory_compiler.dart'; 26 import '../memory_compiler.dart';
26 import '../equivalence/check_functions.dart'; 27 import '../equivalence/check_functions.dart';
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 if (arguments.uri != null) { 74 if (arguments.uri != null) {
74 entryPoint = arguments.uri; 75 entryPoint = arguments.uri;
75 memorySourceFiles = const <String, String>{}; 76 memorySourceFiles = const <String, String>{};
76 } else { 77 } else {
77 entryPoint = Uri.parse('memory:main.dart'); 78 entryPoint = Uri.parse('memory:main.dart');
78 memorySourceFiles = SOURCE; 79 memorySourceFiles = SOURCE;
79 } 80 }
80 81
81 enableDebugMode(); 82 enableDebugMode();
82 EnumCreator.matchKernelRepresentationForTesting = true; 83 EnumCreator.matchKernelRepresentationForTesting = true;
84 Elements.usePatchedDart2jsSdkSorting = true;
83 85
84 Directory dir = await Directory.systemTemp.createTemp('dart2js-with-dill'); 86 Directory dir = await Directory.systemTemp.createTemp('dart2js-with-dill');
85 print('--- create temp directory $dir -------------------------------'); 87 print('--- create temp directory $dir -------------------------------');
86 memorySourceFiles.forEach((String name, String source) { 88 memorySourceFiles.forEach((String name, String source) {
87 new File.fromUri(dir.uri.resolve(name)).writeAsStringSync(source); 89 new File.fromUri(dir.uri.resolve(name)).writeAsStringSync(source);
88 }); 90 });
89 entryPoint = dir.uri.resolve(entryPoint.path); 91 entryPoint = dir.uri.resolve(entryPoint.path);
90 92
91 print('---- compile from ast ----------------------------------------------'); 93 print('---- compile from ast ----------------------------------------------');
92 DiagnosticCollector collector = new DiagnosticCollector(); 94 DiagnosticCollector collector = new DiagnosticCollector();
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 } 193 }
192 Map<String, BufferedOutputSink> map2 = collector2.outputMap[outputType]; 194 Map<String, BufferedOutputSink> map2 = collector2.outputMap[outputType];
193 checkSets(map1.keys, map2.keys, 'output', equality); 195 checkSets(map1.keys, map2.keys, 'output', equality);
194 map1.forEach((String name, BufferedOutputSink output1) { 196 map1.forEach((String name, BufferedOutputSink output1) {
195 BufferedOutputSink output2 = map2[name]; 197 BufferedOutputSink output2 = map2[name];
196 Expect.stringEquals(output1.text, output2.text); 198 Expect.stringEquals(output1.text, output2.text);
197 }); 199 });
198 }); 200 });
199 return ResultKind.success; 201 return ResultKind.success;
200 } 202 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698