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

Side by Side Diff: pkg/kernel/test/baseline_tester.dart

Issue 2677433002: Fix a bug in the Kernel testing framework (Closed)
Patch Set: Created 3 years, 10 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 import 'dart:io'; 4 import 'dart:io';
5 5
6 import 'package:kernel/analyzer/loader.dart'; 6 import 'package:kernel/analyzer/loader.dart';
7 import 'package:kernel/application_root.dart'; 7 import 'package:kernel/application_root.dart';
8 import 'package:kernel/kernel.dart'; 8 import 'package:kernel/kernel.dart';
9 import 'package:kernel/target/targets.dart'; 9 import 'package:kernel/target/targets.dart';
10 import 'package:kernel/text/ast_to_text.dart'; 10 import 'package:kernel/text/ast_to_text.dart';
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 var repository = new Repository(); 47 var repository = new Repository();
48 var loader = await batch.getLoader( 48 var loader = await batch.getLoader(
49 repository, 49 repository,
50 new DartOptions( 50 new DartOptions(
51 strongMode: target.strongMode, 51 strongMode: target.strongMode,
52 sdk: sdkDirectory, 52 sdk: sdkDirectory,
53 declaredVariables: target.extraDeclaredVariables, 53 declaredVariables: target.extraDeclaredVariables,
54 applicationRoot: applicationRoot)); 54 applicationRoot: applicationRoot));
55 var program = loader.loadProgram(dartPath, target: target); 55 var program = loader.loadProgram(dartPath, target: target);
56 verifyProgram(program); 56 verifyProgram(program);
57 var errors = target.performModularTransformations(program); 57 var errors = <String>[];
58 errors.addAll(target.performModularTransformations(program));
58 verifyProgram(program); 59 verifyProgram(program);
59 errors.addAll(target.performGlobalTransformations(program)); 60 errors.addAll(target.performGlobalTransformations(program));
60 verifyProgram(program); 61 verifyProgram(program);
61 62
62 var buffer = new StringBuffer(); 63 var buffer = new StringBuffer();
63 for (var error in errors) { 64 for (var error in errors) {
64 buffer.writeln('// $error'); 65 buffer.writeln('// $error');
65 } 66 }
66 new Printer(buffer, annotator: target.annotator) 67 new Printer(buffer, annotator: target.annotator)
67 .writeLibraryFile(program.mainMethod.enclosingLibrary); 68 .writeLibraryFile(program.mainMethod.enclosingLibrary);
(...skipping 11 matching lines...) Expand all
79 ' rm $filenameOfBaseline\n' 80 ' rm $filenameOfBaseline\n'
80 'Command to see the diff:\n' 81 'Command to see the diff:\n'
81 ' diff -cd $outputDirectory/$shortName.{baseline,current}.txt' 82 ' diff -cd $outputDirectory/$shortName.{baseline,current}.txt'
82 '\n'); 83 '\n');
83 } 84 }
84 } 85 }
85 }); 86 });
86 } 87 }
87 } 88 }
88 } 89 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698