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

Side by Side Diff: test/report_test.dart

Issue 1266483003: format with dart_style 0.2.0-rc.3 (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 4 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 | « test/dependency_graph_test.dart ('k') | test/testing.dart » ('j') | 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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 /// Tests for summary reporting. 5 /// Tests for summary reporting.
6 library dev_compiler.test.report_test; 6 library dev_compiler.test.report_test;
7 7
8 import 'package:test/test.dart'; 8 import 'package:test/test.dart';
9 9
10 import 'package:dev_compiler/devc.dart'; 10 import 'package:dev_compiler/devc.dart';
(...skipping 21 matching lines...) Expand all
32 test2() { 32 test2() {
33 int y = /*info:AssignmentCast*/x; 33 int y = /*info:AssignmentCast*/x;
34 } 34 }
35 '''.replaceAll('\n ', '\n'), 35 '''.replaceAll('\n ', '\n'),
36 }; 36 };
37 37
38 var provider = createTestResourceProvider(files); 38 var provider = createTestResourceProvider(files);
39 var uriResolver = new TestUriResolver(provider); 39 var uriResolver = new TestUriResolver(provider);
40 var srcOpts = new SourceResolverOptions(useMockSdk: true); 40 var srcOpts = new SourceResolverOptions(useMockSdk: true);
41 var context = createAnalysisContextWithSources( 41 var context = createAnalysisContextWithSources(
42 new StrongModeOptions(), srcOpts, fileResolvers: [uriResolver]); 42 new StrongModeOptions(), srcOpts,
43 fileResolvers: [uriResolver]);
43 var reporter = new SummaryReporter(context); 44 var reporter = new SummaryReporter(context);
44 new BatchCompiler(context, new CompilerOptions(sourceOptions: srcOpts), 45 new BatchCompiler(context, new CompilerOptions(sourceOptions: srcOpts),
45 reporter: reporter).compileFromUriString('/main.dart'); 46 reporter: reporter).compileFromUriString('/main.dart');
46 47
47 _verifySummary(GlobalSummary summary) { 48 _verifySummary(GlobalSummary summary) {
48 var mainLib = summary.loose['file:///main.dart']; 49 var mainLib = summary.loose['file:///main.dart'];
49 expect(mainLib.messages.length, 2); 50 expect(mainLib.messages.length, 2);
50 var analyzerMsg = mainLib.messages[0]; 51 var analyzerMsg = mainLib.messages[0];
51 expect(analyzerMsg.kind, "AnalyzerMessage"); 52 expect(analyzerMsg.kind, "AnalyzerMessage");
52 53
(...skipping 11 matching lines...) Expand all
64 expect(barMessage.level, "info"); 65 expect(barMessage.level, "info");
65 expect(barMessage.span.text, 'x'); 66 expect(barMessage.span.text, 'x');
66 expect(barMessage.span.context, ' int y = /*info:AssignmentCast*/x;\n'); 67 expect(barMessage.span.context, ' int y = /*info:AssignmentCast*/x;\n');
67 } 68 }
68 69
69 var original = reporter.result; 70 var original = reporter.result;
70 _verifySummary(original); 71 _verifySummary(original);
71 _verifySummary(GlobalSummary.parse(original.toJsonMap())); 72 _verifySummary(GlobalSummary.parse(original.toJsonMap()));
72 }); 73 });
73 } 74 }
OLDNEW
« no previous file with comments | « test/dependency_graph_test.dart ('k') | test/testing.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698