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

Unified Diff: tests/compiler/dart2js/serialization_impact_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_impact_test.dart
diff --git a/tests/compiler/dart2js/serialization_impact_test.dart b/tests/compiler/dart2js/serialization_impact_test.dart
deleted file mode 100644
index 6f5fd15ce3ea70c8b51e9bb635a0efbe3b11a157..0000000000000000000000000000000000000000
--- a/tests/compiler/dart2js/serialization_impact_test.dart
+++ /dev/null
@@ -1,55 +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_impact_test;
-
-import 'dart:async';
-import 'package:async_helper/async_helper.dart';
-import 'package:compiler/src/commandline_options.dart';
-import 'package:compiler/src/common/resolution.dart';
-import 'package:compiler/src/compiler.dart';
-import 'package:compiler/src/elements/elements.dart';
-import 'package:compiler/src/filenames.dart';
-import 'package:compiler/src/serialization/equivalence.dart';
-import 'memory_compiler.dart';
-import 'serialization_helper.dart';
-import 'serialization_test_helper.dart';
-
-main(List<String> args) {
- Arguments arguments = new Arguments.from(args);
- asyncTest(() async {
- String serializedData = await serializeDartCore(arguments: arguments);
- if (arguments.filename != null) {
- Uri entryPoint = Uri.base.resolve(nativeToUriPath(arguments.filename));
- await check(serializedData, entryPoint);
- } else {
- Uri entryPoint = Uri.parse('memory:main.dart');
- await check(serializedData, entryPoint,
- sourceFiles: {'main.dart': 'main() {}'},
- verbose: arguments.verbose);
- }
- });
-}
-
-Future check(
- String serializedData,
- Uri entryPoint,
- {Map<String, String> sourceFiles: const <String, String>{},
- bool verbose: false}) async {
-
- Compiler compilerNormal = compilerFor(
- memorySourceFiles: sourceFiles,
- options: [Flags.analyzeAll]);
- compilerNormal.resolution.retainCachesForTesting = true;
- await compilerNormal.run(entryPoint);
-
- Compiler compilerDeserialized = compilerFor(
- memorySourceFiles: sourceFiles,
- options: [Flags.analyzeAll]);
- compilerDeserialized.resolution.retainCachesForTesting = true;
- deserialize(compilerDeserialized, serializedData);
- await compilerDeserialized.run(entryPoint);
-
- checkAllImpacts(compilerNormal, compilerDeserialized, verbose: verbose);
-}
« no previous file with comments | « tests/compiler/dart2js/serialization_helper.dart ('k') | tests/compiler/dart2js/serialization_library_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698