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

Unified Diff: tests/compiler/dart2js/kernel/impact_test.dart

Issue 2653673011: Reenable parts of kernel/impact_test (Closed)
Patch Set: Fix. Created 3 years, 11 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
« no previous file with comments | « tests/compiler/dart2js/dart2js.status ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/kernel/impact_test.dart
diff --git a/tests/compiler/dart2js/kernel/impact_test.dart b/tests/compiler/dart2js/kernel/impact_test.dart
index 64e18a883c21a4fd486485d43bed569610e6b343..e011e2d4516073db01e2930f6c7681f19413312d 100644
--- a/tests/compiler/dart2js/kernel/impact_test.dart
+++ b/tests/compiler/dart2js/kernel/impact_test.dart
@@ -614,6 +614,7 @@ typedef X GenericTypedef<X, Y>(Y y);
};
main(List<String> args) {
+ bool fullTest = args.contains('--full');
asyncTest(() async {
enableDebugMode();
Uri entryPoint = Uri.parse('memory:main.dart');
@@ -621,17 +622,20 @@ main(List<String> args) {
entryPoint: entryPoint,
memorySourceFiles: SOURCE,
options: [
- Flags.analyzeAll,
+ fullTest ? Flags.analyzeAll : Flags.analyzeOnly,
Flags.useKernel,
Flags.enableAssertMessage
]);
compiler.resolution.retainCachesForTesting = true;
await compiler.run(entryPoint);
- checkLibrary(compiler, compiler.mainApp, fullTest: args.contains('--full'));
- compiler.libraryLoader.libraries.forEach((LibraryElement library) {
- if (library == compiler.mainApp) return;
- checkLibrary(compiler, library, fullTest: args.contains('--full'));
- });
+ checkLibrary(compiler, compiler.mainApp, fullTest: fullTest);
+ if (fullTest) {
+ // TODO(johnniwinther): Handle all libraries for `!fullTest`.
+ compiler.libraryLoader.libraries.forEach((LibraryElement library) {
+ if (library == compiler.mainApp) return;
+ checkLibrary(compiler, library, fullTest: fullTest);
+ });
+ }
});
}
@@ -655,6 +659,7 @@ void checkElement(Compiler compiler, AstElement element,
{bool fullTest: false}) {
if (!fullTest) {
if (element.library.isPlatformLibrary) {
+ // TODO(johnniwinther): Enqueue these elements for `!fullTest`.
// Test only selected elements in web-related platform libraries since
// this unittest otherwise takes too long to run.
switch (element.library.canonicalUri.path) {
@@ -667,9 +672,9 @@ void checkElement(Compiler compiler, AstElement element,
case 'web_gl':
if ('$element' ==
'function(RenderingContext#getFramebufferAttachmentParameter)') {
- return;
+ break;
}
- break;
+ return;
case 'indexed_db':
if ('$element' == 'field(ObjectStore#keyPath)') {
break;
@@ -687,6 +692,9 @@ void checkElement(Compiler compiler, AstElement element,
return;
}
}
+ if (!fullTest && !compiler.resolution.hasResolutionImpact(element)) {
+ return;
+ }
ResolutionImpact astImpact = compiler.resolution.getResolutionImpact(element);
astImpact = laxImpact(compiler, element, astImpact);
ResolutionImpact kernelImpact = build(compiler, element.resolvedAst);
« no previous file with comments | « tests/compiler/dart2js/dart2js.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698