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

Unified Diff: tools/migration/lib/src/validate.dart

Issue 2989743002: Add some more validation of things in expect that should not be used. (Closed)
Patch Set: Created 3 years, 5 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/expect/lib/expect.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/migration/lib/src/validate.dart
diff --git a/tools/migration/lib/src/validate.dart b/tools/migration/lib/src/validate.dart
index 5dbbeaaabd9188537d0d0a2441f0ca7297c73efe..c91547ee8b9e61a2f75e9bffd32da79537c312a2 100644
--- a/tools/migration/lib/src/validate.dart
+++ b/tools/migration/lib/src/validate.dart
@@ -9,6 +9,8 @@ final _checkedPattern = new RegExp(r"\bchecked\b");
final _abstractErrorPattern =
new RegExp(r"\bAbstractClassInstantiationError\b");
final _typeErrorPattern = new RegExp(r"\bTypeError\b");
+final _typeAssertionsEnabledPattern = new RegExp(r"\btypeAssertionsEnabled\b");
+final _checkedModeEnabledPattern = new RegExp(r"\bcheckedModeEnabled\b");
void validateFile(String path, String source, [List<String> todos]) {
check(Pattern pattern, String noteMessage, String todo) {
@@ -24,4 +26,8 @@ void validateFile(String path, String source, [List<String> todos]) {
"Remove code that checks for AbstractClassInstantiationError.");
check(_typeErrorPattern, 'mentions "TypeError"',
"Ensure code that checks for a TypeError uses 2.0 semantics.");
+ check(_typeAssertionsEnabledPattern, 'mentions "typeAssertionsEnabled"',
+ "Remove checks for typeAssertionsEnabled, they are always enabled in 2.0.");
+ check(_checkedModeEnabledPattern, 'mentions "typeAssertionsEnabled"',
+ "Remove checks for checkedModeEnabled, it is always enabled in 2.0.");
}
« no previous file with comments | « pkg/expect/lib/expect.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698