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

Side by Side Diff: test/report_test.dart

Issue 1014573003: Adding Travis CI and Coveralls support (Closed) Base URL: https://github.com/dart-lang/dart-dev-compiler.git@master
Patch Set: Created 5 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 /// 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:unittest/compact_vm_config.dart';
9 import 'package:unittest/unittest.dart'; 8 import 'package:unittest/unittest.dart';
10 9
11 import 'package:dev_compiler/src/testing.dart'; 10 import 'package:dev_compiler/src/testing.dart';
12 import 'package:dev_compiler/src/report.dart'; 11 import 'package:dev_compiler/src/report.dart';
13 import 'package:dev_compiler/src/summary.dart'; 12 import 'package:dev_compiler/src/summary.dart';
14 13
15 main() { 14 import 'test_util.dart';
16 useCompactVMConfiguration(); 15
16 void main() {
17 configureTest();
18
17 test('toJson/parse', () { 19 test('toJson/parse', () {
18 var files = { 20 var files = {
19 '/main.dart': ''' 21 '/main.dart': '''
20 import 'package:foo/bar.dart'; 22 import 'package:foo/bar.dart';
21 23
22 test1() { 24 test1() {
23 x = /*severe:StaticTypeError*/"hi"; 25 x = /*severe:StaticTypeError*/"hi";
24 } 26 }
25 ''', 27 ''',
26 'package:foo/bar.dart': ''' 28 'package:foo/bar.dart': '''
(...skipping 10 matching lines...) Expand all
37 var summary1 = reporter.result; 39 var summary1 = reporter.result;
38 expect(summary1.loose['file:///main.dart'].messages.length, 1); 40 expect(summary1.loose['file:///main.dart'].messages.length, 1);
39 var barUrl = 'package:foo/bar.dart'; 41 var barUrl = 'package:foo/bar.dart';
40 expect(summary1.packages['foo'].libraries[barUrl].messages.length, 1); 42 expect(summary1.packages['foo'].libraries[barUrl].messages.length, 1);
41 43
42 var summary2 = GlobalSummary.parse(summary1.toJsonMap()); 44 var summary2 = GlobalSummary.parse(summary1.toJsonMap());
43 expect(summary2.loose['file:///main.dart'].messages.length, 1); 45 expect(summary2.loose['file:///main.dart'].messages.length, 1);
44 expect(summary2.packages['foo'].libraries[barUrl].messages.length, 1); 46 expect(summary2.packages['foo'].libraries[barUrl].messages.length, 1);
45 }); 47 });
46 } 48 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698