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

Unified Diff: pkg/analyzer/test/generated/scanner_test.dart

Issue 1239513005: Switch on null-aware operators by default in analyzer. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 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
Index: pkg/analyzer/test/generated/scanner_test.dart
diff --git a/pkg/analyzer/test/generated/scanner_test.dart b/pkg/analyzer/test/generated/scanner_test.dart
index 24ca20e106a88f1b330065dec79054fe9f9bda06..c1a6603ebdc7edfbac9a3b205de484144224519a 100644
--- a/pkg/analyzer/test/generated/scanner_test.dart
+++ b/pkg/analyzer/test/generated/scanner_test.dart
@@ -170,12 +170,6 @@ class KeywordStateTest {
@reflectiveTest
class ScannerTest {
- /**
- * If non-null, this value is used to override the default value of
- * [Scanner.enableNullAwareOperators] before scanning.
- */
- bool _enableNullAwareOperators;
-
void fail_incomplete_string_interpolation() {
// https://code.google.com/p/dart/issues/detail?id=18073
_assertErrorAndTokens(ScannerErrorCode.UNTERMINATED_STRING_LITERAL, 9,
@@ -727,17 +721,14 @@ class ScannerTest {
}
void test_question_dot() {
- _enableNullAwareOperators = true;
_assertToken(TokenType.QUESTION_PERIOD, "?.");
}
void test_question_question() {
- _enableNullAwareOperators = true;
_assertToken(TokenType.QUESTION_QUESTION, "??");
}
void test_question_question_eq() {
- _enableNullAwareOperators = true;
_assertToken(TokenType.QUESTION_QUESTION_EQ, "??=");
}
@@ -1229,9 +1220,6 @@ class ScannerTest {
Token _scanWithListener(String source, GatheringErrorListener listener) {
Scanner scanner =
new Scanner(null, new CharSequenceReader(source), listener);
- if (_enableNullAwareOperators != null) {
- scanner.enableNullAwareOperators = _enableNullAwareOperators;
- }
Token result = scanner.tokenize();
listener.setLineInfo(new TestSource(), scanner.lineStarts);
return result;
« no previous file with comments | « pkg/analyzer/test/generated/resolver_test.dart ('k') | pkg/analyzer/test/generated/static_type_warning_code_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698