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

Unified Diff: utils/tests/pub/validator_test.dart

Issue 12089076: Add a pub validator for compiled dartdoc output. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Code review changes Created 7 years, 11 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 | « utils/pub/validator/compiled_dartdoc.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/tests/pub/validator_test.dart
diff --git a/utils/tests/pub/validator_test.dart b/utils/tests/pub/validator_test.dart
index 75b51ff010b66366d3ab7e4b231653196d25fc96..cc89c62a75616438f9d8de82603ee78ef542d797 100644
--- a/utils/tests/pub/validator_test.dart
+++ b/utils/tests/pub/validator_test.dart
@@ -15,6 +15,7 @@ import '../../../pkg/http/lib/testing.dart';
import '../../pub/entrypoint.dart';
import '../../pub/io.dart';
import '../../pub/validator.dart';
+import '../../pub/validator/compiled_dartdoc.dart';
import '../../pub/validator/dependency.dart';
import '../../pub/validator/directory.dart';
import '../../pub/validator/lib.dart';
@@ -34,6 +35,9 @@ void expectValidationWarning(ValidatorCreator fn) {
expectLater(schedulePackageValidation(fn), pairOf(isEmpty, isNot(isEmpty)));
}
+Validator compiledDartdoc(Entrypoint entrypoint) =>
+ new CompiledDartdocValidator(entrypoint);
+
Validator dependency(Entrypoint entrypoint) =>
new DependencyValidator(entrypoint);
@@ -125,6 +129,18 @@ main() {
]).scheduleCreate();
expectNoValidationError(directory);
});
+
+ integration('has most but not all files from compiling dartdoc', () {
+ dir(appPath, [
+ dir("doc-out", [
+ file("nav.json", ""),
+ file("index.html", ""),
+ file("styles.css", ""),
+ file("dart-logo-small.png", "")
+ ])
+ ]).scheduleCreate();
+ expectNoValidationError(compiledDartdoc);
+ });
});
group('should consider a package invalid if it', () {
@@ -520,5 +536,19 @@ main() {
});
}
});
+
+ test('contains compiled dartdoc', () {
+ dir(appPath, [
+ dir('doc-out', [
+ file('nav.json', ''),
+ file('index.html', ''),
+ file('styles.css', ''),
+ file('dart-logo-small.png', ''),
+ file('client-live-nav.js', '')
+ ])
+ ]).scheduleCreate();
+
+ expectValidationWarning(compiledDartdoc);
+ });
});
}
« no previous file with comments | « utils/pub/validator/compiled_dartdoc.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698