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

Side by Side Diff: tests/compiler/dart2js/serialization/resolved_ast_test.dart

Issue 1934883002: Refactor unittests (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 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
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 library dart2js.serialization_resolved_ast_test; 5 library dart2js.serialization_resolved_ast_test;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'package:async_helper/async_helper.dart'; 8 import 'package:async_helper/async_helper.dart';
9 import 'package:expect/expect.dart'; 9 import 'package:expect/expect.dart';
10 import 'package:compiler/src/commandline_options.dart'; 10 import 'package:compiler/src/commandline_options.dart';
11 import 'package:compiler/src/common/backend_api.dart'; 11 import 'package:compiler/src/common/backend_api.dart';
12 import 'package:compiler/src/common/names.dart'; 12 import 'package:compiler/src/common/names.dart';
13 import 'package:compiler/src/compiler.dart'; 13 import 'package:compiler/src/compiler.dart';
14 import 'package:compiler/src/elements/elements.dart'; 14 import 'package:compiler/src/elements/elements.dart';
15 import 'package:compiler/src/filenames.dart'; 15 import 'package:compiler/src/filenames.dart';
16 import 'package:compiler/src/serialization/equivalence.dart'; 16 import 'package:compiler/src/serialization/equivalence.dart';
17 import 'memory_compiler.dart'; 17 import '../memory_compiler.dart';
18 import 'serialization_helper.dart'; 18 import 'helper.dart';
19 import 'serialization_test_data.dart'; 19 import 'test_data.dart';
20 import 'serialization_test_helper.dart'; 20 import 'test_helper.dart';
21 21
22 22
23 main(List<String> args) { 23 main(List<String> args) {
24 Arguments arguments = new Arguments.from(args); 24 Arguments arguments = new Arguments.from(args);
25 asyncTest(() async { 25 asyncTest(() async {
26 String serializedData = await serializeDartCore( 26 String serializedData = await serializeDartCore(
27 arguments: arguments, serializeResolvedAst: true); 27 arguments: arguments, serializeResolvedAst: true);
28 if (arguments.filename != null) { 28 if (arguments.filename != null) {
29 Uri entryPoint = Uri.base.resolve(nativeToUriPath(arguments.filename)); 29 Uri entryPoint = Uri.base.resolve(nativeToUriPath(arguments.filename));
30 await check(serializedData, entryPoint); 30 await check(serializedData, entryPoint);
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 85
86 if (resolvedAst1 == null || resolvedAst2 == null) return; 86 if (resolvedAst1 == null || resolvedAst2 == null) return;
87 87
88 if (verbose) { 88 if (verbose) {
89 print('Checking resolved asts for $member1 vs $member2'); 89 print('Checking resolved asts for $member1 vs $member2');
90 } 90 }
91 91
92 testResolvedAstEquivalence( 92 testResolvedAstEquivalence(
93 resolvedAst1, resolvedAst2, const CheckStrategy()); 93 resolvedAst1, resolvedAst2, const CheckStrategy());
94 } 94 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/serialization/model_test.dart ('k') | tests/compiler/dart2js/serialization/test_data.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698