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

Unified Diff: test/rule_test.dart

Issue 1415723007: SDK mocking for improved test throughput. (Closed) Base URL: https://github.com/dart-lang/linter.git@master
Patch Set: Created 5 years, 1 month 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 | « lib/src/sdk.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/rule_test.dart
diff --git a/test/rule_test.dart b/test/rule_test.dart
index 65aa5291cf33c95fc5bc6bdc857389ce2ac5d4b7..9d8a4d4da5510535abbda0868084ab5acb266172 100644
--- a/test/rule_test.dart
+++ b/test/rule_test.dart
@@ -353,8 +353,12 @@ testRule(String ruleName, File file, {bool debug: false}) {
++lineNumber;
}
- DartLinter driver = new DartLinter.forRules(
- [ruleRegistry[ruleName]].where((rule) => rule != null));
+ LinterOptions options = new LinterOptions(
+ [ruleRegistry[ruleName]].where((rule) => rule != null))
+ ..useMockSdk = true
+ ..packageRootPath = '.';
+
+ DartLinter driver = new DartLinter(options);
Iterable<AnalysisErrorInfo> lints = driver.lintFiles([file]);
@@ -369,7 +373,6 @@ testRule(String ruleName, File file, {bool debug: false}) {
try {
expect(actual, unorderedMatches(expected));
} on Error catch (e) {
-
if (debug) {
// Dump results for debugging purposes.
« no previous file with comments | « lib/src/sdk.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698