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

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

Issue 2873113004: Add equivalence check of NativeData and InterceptorData (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) 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.closed_world2_test; 7 library dart2js.kernel.closed_world2_test;
8 8
9 import 'dart:async'; 9 import 'dart:async';
10 10
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 checkNativeClasses(compiler1, compiler2, equivalence); 168 checkNativeClasses(compiler1, compiler2, equivalence);
169 169
170 checkBackendUsage(backendUsage1, backendUsage2, equivalence); 170 checkBackendUsage(backendUsage1, backendUsage2, equivalence);
171 171
172 checkResolutionEnqueuers(backendUsage1, backendUsage2, enqueuer1, enqueuer2, 172 checkResolutionEnqueuers(backendUsage1, backendUsage2, enqueuer1, enqueuer2,
173 elementEquivalence: equivalence.entityEquivalence, 173 elementEquivalence: equivalence.entityEquivalence,
174 typeEquivalence: (ResolutionDartType a, DartType b) { 174 typeEquivalence: (ResolutionDartType a, DartType b) {
175 return equivalence.typeEquivalence(unalias(a), b); 175 return equivalence.typeEquivalence(unalias(a), b);
176 }, elementFilter: elementFilter, verbose: arguments.verbose); 176 }, elementFilter: elementFilter, verbose: arguments.verbose);
177 177
178 checkClosedWorlds(closedWorld1, closedWorld2, equivalence.entityEquivalence, 178 checkClosedWorlds(closedWorld1, closedWorld2,
179 verbose: arguments.verbose); 179 strategy: equivalence.defaultStrategy, verbose: arguments.verbose);
180 180
181 return ResultKind.success; 181 return ResultKind.success;
182 } 182 }
183 183
184 void checkNativeClasses( 184 void checkNativeClasses(
185 Compiler compiler1, Compiler compiler2, KernelEquivalence equivalence) { 185 Compiler compiler1, Compiler compiler2, KernelEquivalence equivalence) {
186 Iterable<ClassEntity> nativeClasses1 = compiler1 186 Iterable<ClassEntity> nativeClasses1 = compiler1
187 .backend.nativeResolutionEnqueuerForTesting.nativeClassesForTesting; 187 .backend.nativeResolutionEnqueuerForTesting.nativeClassesForTesting;
188 Iterable<ClassEntity> nativeClasses2 = compiler2 188 Iterable<ClassEntity> nativeClasses2 = compiler2
189 .backend.nativeResolutionEnqueuerForTesting.nativeClassesForTesting; 189 .backend.nativeResolutionEnqueuerForTesting.nativeClassesForTesting;
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 300
301 classes2.add(cls2); 301 classes2.add(cls2);
302 }); 302 });
303 env2.forEachClass(lib2, (ClassEntity cls2) { 303 env2.forEachClass(lib2, (ClassEntity cls2) {
304 Expect.isTrue(classes2.contains(cls2), "Extra class $cls2 in $lib2"); 304 Expect.isTrue(classes2.contains(cls2), "Extra class $cls2 in $lib2");
305 }); 305 });
306 }); 306 });
307 307
308 // TODO(johnniwinther): Test the remaining properties of [ElementEnvironment]. 308 // TODO(johnniwinther): Test the remaining properties of [ElementEnvironment].
309 } 309 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698