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

Unified Diff: pkg/polymer/test/build/compiler_test.dart

Issue 23898009: Switch polymer's build.dart to use the new linter. This CL does the following (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: addressing john comments (part 2) - renamed files 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/polymer/lib/src/utils_observe.dart ('k') | pkg/polymer/test/build/css_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/polymer/test/build/compiler_test.dart
diff --git a/pkg/polymer/test/build/compiler_test.dart b/pkg/polymer/test/build/compiler_test.dart
deleted file mode 100644
index abe5e32fa26d0a17bc07ccf278c17eb04d15ee04..0000000000000000000000000000000000000000
--- a/pkg/polymer/test/build/compiler_test.dart
+++ /dev/null
@@ -1,110 +0,0 @@
-// Copyright (c) 2012, 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.
-
-/** End-to-end tests for the [Compiler] API. */
-library compiler_test;
-
-import 'package:logging/logging.dart' show Level;
-import 'package:path/path.dart' as path;
-import 'package:polymer/src/messages.dart';
-import 'package:unittest/compact_vm_config.dart';
-import 'package:unittest/unittest.dart';
-
-import 'testing.dart';
-
-main() {
- useCompactVMConfiguration();
-
- test('recursive dependencies', () {
- var messages = new Messages.silent();
- var compiler = createCompiler({
- 'index.html': '<head>'
- '<link rel="import" href="foo.html">'
- '<link rel="import" href="bar.html">'
- '<body><x-foo></x-foo><x-bar></x-bar>'
- '<script type="application/dart">main() {}</script>',
- 'foo.html': '<head><link rel="import" href="bar.html">'
- '<body><polymer-element name="x-foo" constructor="Foo">'
- '<template><x-bar>',
- 'bar.html': '<head><link rel="import" href="foo.html">'
- '<body><polymer-element name="x-bar" constructor="Boo">'
- '<template><x-foo>',
- }, messages);
-
- compiler.run().then(expectAsync1((e) {
- MockFileSystem fs = compiler.fileSystem;
- expect(fs.readCount, equals({
- 'index.html': 1,
- 'foo.html': 1,
- 'bar.html': 1
- }), reason: 'Actual:\n ${fs.readCount}');
- }));
- });
-
- group('missing files', () {
- test('main script', () {
- var messages = new Messages.silent();
- var compiler = createCompiler({
- 'index.html': '<head></head><body>'
- '<script type="application/dart" src="notfound.dart"></script>'
- '</body>',
- }, messages);
-
- compiler.run().then(expectAsync1((e) {
- var msgs = messages.messages.where((m) =>
- m.message.contains('unable')).toList();
- expect(msgs.length, 0);
- MockFileSystem fs = compiler.fileSystem;
- expect(fs.readCount, { 'index.html': 1 });
- }));
- });
-
- test('component html', () {
- var messages = new Messages.silent();
- var compiler = createCompiler({
- 'index.html': '<head>'
- '<link rel="import" href="notfound.html">'
- '<body><x-foo>'
- '<script type="application/dart">main() {}</script>',
- }, messages);
-
- compiler.run().then(expectAsync1((e) {
- var msgs = messages.messages.where((m) =>
- m.message.contains('unable')).toList();
-
- expect(msgs.length, 1);
- expect(msgs[0].level, Level.SEVERE);
- expect(msgs[0].message, contains('unable to open file'));
- expect(msgs[0].span, isNotNull);
- expect(msgs[0].span.sourceUrl, 'index.html');
-
- MockFileSystem fs = compiler.fileSystem;
- expect(fs.readCount, { 'index.html': 1, 'notfound.html': 1 });
- }));
- });
-
- test('component script', () {
- var messages = new Messages.silent();
- var compiler = createCompiler({
- 'index.html': '<head>'
- '<link rel="import" href="foo.html">'
- '<body><x-foo></x-foo>'
- '<script type="application/dart">main() {}</script>'
- '</body>',
- 'foo.html': '<body><polymer-element name="x-foo" constructor="Foo">'
- '<template></template>'
- '<script type="application/dart" src="notfound.dart"></script>',
- }, messages);
-
- compiler.run().then(expectAsync1((e) {
- var msgs = messages.messages.where((m) =>
- m.message.contains('unable')).toList();
- expect(msgs.length, 0);
- MockFileSystem fs = compiler.fileSystem;
- expect(fs.readCount,
- { 'index.html': 1, 'foo.html': 1 });
- }));
- });
- });
-}
« no previous file with comments | « pkg/polymer/lib/src/utils_observe.dart ('k') | pkg/polymer/test/build/css_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698