OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 polymer.test.linter_test; | 5 library polymer.test.linter_test; |
6 | 6 |
7 import 'package:polymer/src/linter.dart'; | 7 import 'package:polymer/src/build/common.dart'; |
8 import 'package:polymer/src/transform/common.dart'; | 8 import 'package:polymer/src/build/linter.dart'; |
9 import 'package:source_maps/span.dart'; | 9 import 'package:source_maps/span.dart'; |
10 import 'package:unittest/compact_vm_config.dart'; | 10 import 'package:unittest/compact_vm_config.dart'; |
11 import 'package:unittest/unittest.dart'; | 11 import 'package:unittest/unittest.dart'; |
12 | 12 |
13 import '../transform/common.dart'; | 13 import 'common.dart'; |
14 | 14 |
15 void main() { | 15 void main() { |
16 useCompactVMConfiguration(); | 16 useCompactVMConfiguration(); |
17 _testLinter('nothing to report', { | 17 _testLinter('nothing to report', { |
18 'a|web/test.html': '<!DOCTYPE html><html></html>', | 18 'a|web/test.html': '<!DOCTYPE html><html></html>', |
19 }, { | 19 }, { |
20 'a|web/test.html.messages': '', | 20 'a|web/test.html.messages': '', |
21 }); | 21 }); |
22 | 22 |
23 group('doctype warning', () { | 23 group('doctype warning', () { |
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
413 | 413 |
414 | 414 |
415 _testFormatter(String kind, String message, Span span) { | 415 _testFormatter(String kind, String message, Span span) { |
416 var formattedMessage = '$kind: $message'; | 416 var formattedMessage = '$kind: $message'; |
417 if (span != null) { | 417 if (span != null) { |
418 formattedMessage = '$formattedMessage ' | 418 formattedMessage = '$formattedMessage ' |
419 '(${span.sourceUrl} ${span.start.line} ${span.start.column})'; | 419 '(${span.sourceUrl} ${span.start.line} ${span.start.column})'; |
420 } | 420 } |
421 return formattedMessage; | 421 return formattedMessage; |
422 } | 422 } |
OLD | NEW |