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

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

Issue 2879593004: Reorganize equivalence test helpers (Closed)
Patch Set: Created 3 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.class_members_test; 5 library dart2js.serialization.class_members_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:compiler/src/common/names.dart'; 9 import 'package:compiler/src/common/names.dart';
10 import 'package:compiler/src/commandline_options.dart'; 10 import 'package:compiler/src/commandline_options.dart';
11 import 'package:compiler/src/compiler.dart'; 11 import 'package:compiler/src/compiler.dart';
12 import 'package:compiler/src/elements/elements.dart'; 12 import 'package:compiler/src/elements/elements.dart';
13 import 'package:compiler/src/elements/names.dart'; 13 import 'package:compiler/src/elements/names.dart';
14 import 'package:compiler/src/filenames.dart'; 14 import 'package:compiler/src/filenames.dart';
15 import 'package:compiler/src/resolution/class_members.dart'; 15 import 'package:compiler/src/resolution/class_members.dart';
16 import 'package:compiler/src/serialization/equivalence.dart'; 16 import 'package:compiler/src/serialization/equivalence.dart';
17 import '../equivalence/check_helpers.dart';
18 import '../equivalence/check_functions.dart';
17 import '../memory_compiler.dart'; 19 import '../memory_compiler.dart';
18 import 'helper.dart'; 20 import 'helper.dart';
19 import 'test_helper.dart';
20 21
21 main(List<String> args) { 22 main(List<String> args) {
22 Arguments arguments = new Arguments.from(args); 23 Arguments arguments = new Arguments.from(args);
23 asyncTest(() async { 24 asyncTest(() async {
24 SerializedData serializedData = 25 SerializedData serializedData =
25 await serializeDartCore(arguments: arguments); 26 await serializeDartCore(arguments: arguments);
26 if (arguments.filename != null) { 27 if (arguments.filename != null) {
27 Uri entryPoint = Uri.base.resolve(nativeToUriPath(arguments.filename)); 28 Uri entryPoint = Uri.base.resolve(nativeToUriPath(arguments.filename));
28 await checkClassMembers(serializedData, entryPoint, 29 await checkClassMembers(serializedData, entryPoint,
29 verbose: arguments.verbose); 30 verbose: arguments.verbose);
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 areTypesEquivalent); 141 areTypesEquivalent);
141 check(class1, class2, '$property.functionType', member1.functionType, 142 check(class1, class2, '$property.functionType', member1.functionType,
142 member2.functionType, areTypesEquivalent); 143 member2.functionType, areTypesEquivalent);
143 check( 144 check(
144 class1, class2, '$property.isGetter', member1.isGetter, member2.isGetter); 145 class1, class2, '$property.isGetter', member1.isGetter, member2.isGetter);
145 check( 146 check(
146 class1, class2, '$property.isSetter', member1.isSetter, member2.isSetter); 147 class1, class2, '$property.isSetter', member1.isSetter, member2.isSetter);
147 check( 148 check(
148 class1, class2, '$property.isMethod', member1.isMethod, member2.isMethod); 149 class1, class2, '$property.isMethod', member1.isMethod, member2.isMethod);
149 } 150 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698