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

Side by Side Diff: pkg/polymer/test/build/linter_test.dart

Issue 24077003: fix polymer tests -- replace run.sh and run tests using bots (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 3 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 | Annotate | Revision Log
OLDNEW
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:source_maps/span.dart'; 7 import 'package:source_maps/span.dart';
8 import 'package:polymer/src/linter.dart'; 8 import 'package:polymer/src/linter.dart';
9 import 'package:unittest/compact_vm_config.dart'; 9 import 'package:unittest/compact_vm_config.dart';
10 import 'package:unittest/unittest.dart'; 10 import 'package:unittest/unittest.dart';
11 11
12 import 'transform/common.dart'; 12 import '../transform/common.dart';
13 13
14 void main() { 14 void main() {
15 useCompactVMConfiguration(); 15 useCompactVMConfiguration();
16 _testLinter('nothing to report', { 16 _testLinter('nothing to report', {
17 'a|web/test.html': '<!DOCTYPE html><html></html>', 17 'a|web/test.html': '<!DOCTYPE html><html></html>',
18 }, { 18 }, {
19 'a|web/test.html.messages': '', 19 'a|web/test.html.messages': '',
20 }); 20 });
21 21
22 group('doctype warning', () { 22 group('doctype warning', () {
23 _testLinter('in web', { 23 _testLinter('in web', {
24 'a|web/test.html': '<html></html>', 24 'a|web/test.html': '<html></html>',
25 }, { 25 }, {
26 'a|web/test.html.messages': 26 'a|web/test.html.messages':
27 'warning: Unexpected start tag (html). Expected DOCTYPE. ' 27 'warning: Unexpected start tag (html). Expected DOCTYPE. '
28 '(web/test.html 0 0)', 28 '(web/test.html 0 0)',
29 }); 29 });
30 30
31 _testLinter('in lib', { 31 _testLinter('in lib', {
32 'a|lib/test.html': '<html></html>', 32 'a|lib/test.html': '<html></html>',
33 }, { 33 }, {
34 'a|lib/test.html.messages': '', 34 'a|lib/test.html.messages': '',
35 }); 35 });
36 }); 36 });
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 412
413 413
414 _testFormatter(String kind, String message, Span span) { 414 _testFormatter(String kind, String message, Span span) {
415 var formattedMessage = '$kind: $message'; 415 var formattedMessage = '$kind: $message';
416 if (span != null) { 416 if (span != null) {
417 formattedMessage = '$formattedMessage ' 417 formattedMessage = '$formattedMessage '
418 '(${span.sourceUrl} ${span.start.line} ${span.start.column})'; 418 '(${span.sourceUrl} ${span.start.line} ${span.start.column})';
419 } 419 }
420 return formattedMessage; 420 return formattedMessage;
421 } 421 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698