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

Unified Diff: tests/compiler/dart2js/serialization_compilation_test.dart

Issue 1934883002: Refactor unittests (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: tests/compiler/dart2js/serialization_compilation_test.dart
diff --git a/tests/compiler/dart2js/serialization_compilation_test.dart b/tests/compiler/dart2js/serialization_compilation_test.dart
deleted file mode 100644
index 4c5988e3ce8ab47fde3b17a7036b6d28619ffe38..0000000000000000000000000000000000000000
--- a/tests/compiler/dart2js/serialization_compilation_test.dart
+++ /dev/null
@@ -1,64 +0,0 @@
-// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library dart2js.serialization_compilation_test;
-
-import 'dart:async';
-import 'package:async_helper/async_helper.dart';
-import 'package:expect/expect.dart';
-import 'package:compiler/src/commandline_options.dart';
-import 'package:compiler/src/common/backend_api.dart';
-import 'package:compiler/src/common/names.dart';
-import 'package:compiler/src/compiler.dart';
-import 'package:compiler/src/filenames.dart';
-import 'memory_compiler.dart';
-import 'serialization_helper.dart';
-import 'serialization_test_data.dart';
-import 'output_collector.dart';
-
-main(List<String> args) {
- asyncTest(() async {
- Arguments arguments = new Arguments.from(args);
- String serializedData = await serializeDartCore(
- arguments: arguments,
- serializeResolvedAst: true);
- if (arguments.filename != null) {
- Uri entryPoint = Uri.base.resolve(nativeToUriPath(arguments.filename));
- await compile(serializedData, entryPoint, null);
- } else {
- Uri entryPoint = Uri.parse('memory:main.dart');
- // TODO(johnniwinther): Handle the remaining tests.
- for (Test test in TESTS.sublist(0, 5)) {
- await compile(serializedData, entryPoint, test,
- verbose: arguments.verbose);
- }
- }
- });
-}
-
-Future compile(String serializedData, Uri entryPoint, Test test,
- {bool verbose: false}) async {
- String testDescription =
- test != null ? test.sourceFiles[entryPoint.path] : '${entryPoint}';
- print('------------------------------------------------------------------');
- print('compile ${testDescription}');
- print('------------------------------------------------------------------');
- OutputCollector outputCollector = new OutputCollector();
- await runCompiler(
- entryPoint: entryPoint,
- memorySourceFiles: test != null ? test.sourceFiles : const {},
- options: [Flags.disableTypeInference,
- Flags.disableInlining,
- // TODO(johnniwinther): Reenable this: We have some invalid
- // locations
- Flags.noSourceMaps],
- outputProvider: outputCollector,
- beforeRun: (Compiler compiler) {
- deserialize(compiler, serializedData, deserializeResolvedAst: true);
- });
- if (verbose) {
- print(outputCollector.getOutput('', 'js'));
- }
-}
-
« no previous file with comments | « tests/compiler/dart2js/serialization_analysis_test.dart ('k') | tests/compiler/dart2js/serialization_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698