Files
sdk/pkg/analyzer_cli/test/perf_report_test.dart
T
Brian Wilkerson 602a8c2a7b Clean up usage of deprecated constants
Change-Id: I9005ba6e94529e15d8f7b21322591f4a9dabec47
Reviewed-on: https://dart-review.googlesource.com/45763
Commit-Queue: William Hesse <whesse@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2018-03-09 01:02:49 +00:00

24 lines
845 B
Dart

// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
library analyzer_cli.test.perf_report;
import 'dart:convert' show json;
import 'package:analyzer_cli/src/error_formatter.dart' show AnalysisStats;
import 'package:analyzer_cli/src/options.dart';
import 'package:analyzer_cli/src/perf_report.dart';
import 'package:test/test.dart';
main() {
test('makePerfReport', () {
var options = CommandLineOptions.parse(["somefile.dart"]);
var encoded = makePerfReport(1000, 1234, options, 0, new AnalysisStats());
var jsonData = json.decode(encoded);
expect(jsonData['totalElapsedTime'], 234);
expect(jsonData['options']['sourceFiles'], ["somefile.dart"]);
});
}