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

Side by Side Diff: pkg/analyzer_cli/test/perf_report_test.dart

Issue 1806263004: add --x-package-warnings-prefix option to dartanalyzer (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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) 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 library analyzer_cli.test.perf_report; 5 library analyzer_cli.test.perf_report;
6 6
7 import 'dart:convert' show JSON; 7 import 'dart:convert' show JSON;
8 8
9 import 'package:analyzer_cli/src/options.dart'; 9 import 'package:analyzer_cli/src/options.dart';
10 import 'package:analyzer_cli/src/perf_report.dart'; 10 import 'package:analyzer_cli/src/perf_report.dart';
11 import 'package:unittest/unittest.dart'; 11 import 'package:unittest/unittest.dart';
12 import 'package:analyzer/src/generated/engine.dart';
12 13
13 main() { 14 main() {
14 test('makePerfReport', () { 15 test('makePerfReport', () {
15 var options = CommandLineOptions.parse(["somefile.dart"]); 16 var options = CommandLineOptions.parse(["somefile.dart"]);
16 var encoded = makePerfReport(1000, 1234, options); 17 var context = AnalysisEngine.instance.createAnalysisContext();
18 var encoded = makePerfReport(1000, 1234, options, context);
17 19
18 var json = JSON.decode(encoded); 20 var json = JSON.decode(encoded);
19 expect(json['totalElapsedTime'], 234); 21 expect(json['totalElapsedTime'], 234);
20 expect(json['options']['sourceFiles'], ["somefile.dart"]); 22 expect(json['options']['sourceFiles'], ["somefile.dart"]);
21 }); 23 });
22 } 24 }
OLDNEW
« pkg/analyzer_cli/lib/src/options.dart ('K') | « pkg/analyzer_cli/lib/src/perf_report.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698