| OLD | NEW |
| 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 import 'dart:convert' show UTF8; | 5 import 'dart:convert' show UTF8; |
| 6 | 6 |
| 7 import 'package:front_end/src/fasta/scanner/recover.dart' | 7 import 'package:front_end/src/fasta/scanner/recover.dart' |
| 8 show defaultRecoveryStrategy; | 8 show defaultRecoveryStrategy; |
| 9 import 'package:front_end/src/fasta/scanner.dart' as fasta; | 9 import 'package:front_end/src/fasta/scanner.dart' as fasta; |
| 10 import 'package:front_end/src/fasta/scanner/token.dart' as fasta; | 10 import 'package:front_end/src/fasta/scanner/token.dart' as fasta; |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 expect(closeParen1.isSynthetic, isTrue); | 185 expect(closeParen1.isSynthetic, isTrue); |
| 186 expect(openBrace.endToken, same(closeBrace)); | 186 expect(openBrace.endToken, same(closeBrace)); |
| 187 expect(closeBrace.isSynthetic, isFalse); | 187 expect(closeBrace.isSynthetic, isFalse); |
| 188 expect(openParen2.endToken, same(closeParen2)); | 188 expect(openParen2.endToken, same(closeParen2)); |
| 189 expect(closeParen2.isSynthetic, isTrue); | 189 expect(closeParen2.isSynthetic, isTrue); |
| 190 expect(eof.isEof, isTrue); | 190 expect(eof.isEof, isTrue); |
| 191 } | 191 } |
| 192 | 192 |
| 193 @override | 193 @override |
| 194 @failingTest | 194 @failingTest |
| 195 void test_string_multi_unterminated() { | |
| 196 // See defaultRecoveryStrategy recoverString | |
| 197 super.test_string_multi_unterminated(); | |
| 198 } | |
| 199 | |
| 200 @override | |
| 201 @failingTest | |
| 202 void test_string_multi_unterminated_interpolation_block() { | 195 void test_string_multi_unterminated_interpolation_block() { |
| 203 // See defaultRecoveryStrategy recoverString | 196 // See defaultRecoveryStrategy recoverString |
| 204 super.test_string_multi_unterminated_interpolation_block(); | 197 super.test_string_multi_unterminated_interpolation_block(); |
| 205 } | 198 } |
| 206 | 199 |
| 207 @override | 200 @override |
| 208 @failingTest | 201 @failingTest |
| 209 void test_string_multi_unterminated_interpolation_identifier() { | 202 void test_string_multi_unterminated_interpolation_identifier() { |
| 210 // See defaultRecoveryStrategy recoverString | 203 // See defaultRecoveryStrategy recoverString |
| 211 super.test_string_multi_unterminated_interpolation_identifier(); | 204 super.test_string_multi_unterminated_interpolation_identifier(); |
| 212 } | 205 } |
| 213 | 206 |
| 214 @override | 207 @override |
| 215 @failingTest | 208 @failingTest |
| 216 void test_string_raw_multi_unterminated() { | |
| 217 // See defaultRecoveryStrategy recoverString | |
| 218 super.test_string_raw_multi_unterminated(); | |
| 219 } | |
| 220 | |
| 221 @override | |
| 222 @failingTest | |
| 223 void test_string_raw_simple_unterminated_eof() { | |
| 224 // See defaultRecoveryStrategy recoverString | |
| 225 super.test_string_raw_simple_unterminated_eof(); | |
| 226 } | |
| 227 | |
| 228 @override | |
| 229 @failingTest | |
| 230 void test_string_raw_simple_unterminated_eol() { | |
| 231 // See defaultRecoveryStrategy recoverString | |
| 232 super.test_string_raw_simple_unterminated_eol(); | |
| 233 } | |
| 234 | |
| 235 @override | |
| 236 @failingTest | |
| 237 void test_string_simple_interpolation_missingIdentifier() { | 209 void test_string_simple_interpolation_missingIdentifier() { |
| 238 // See defaultRecoveryStrategy recoverStringInterpolation | 210 // See defaultRecoveryStrategy recoverStringInterpolation |
| 239 super.test_string_simple_interpolation_missingIdentifier(); | 211 super.test_string_simple_interpolation_missingIdentifier(); |
| 240 } | 212 } |
| 241 | 213 |
| 242 @override | 214 @override |
| 243 @failingTest | 215 @failingTest |
| 244 void test_string_simple_interpolation_nonIdentifier() { | 216 void test_string_simple_interpolation_nonIdentifier() { |
| 245 // See defaultRecoveryStrategy recoverStringInterpolation | 217 // See defaultRecoveryStrategy recoverStringInterpolation |
| 246 super.test_string_simple_interpolation_nonIdentifier(); | 218 super.test_string_simple_interpolation_nonIdentifier(); |
| 247 } | 219 } |
| 248 | 220 |
| 249 @override | 221 @override |
| 250 @failingTest | 222 @failingTest |
| 251 void test_string_simple_unterminated_eof() { | |
| 252 // See defaultRecoveryStrategy recoverString | |
| 253 super.test_string_simple_unterminated_eof(); | |
| 254 } | |
| 255 | |
| 256 @override | |
| 257 @failingTest | |
| 258 void test_string_simple_unterminated_eol() { | |
| 259 // See defaultRecoveryStrategy recoverString | |
| 260 super.test_string_simple_unterminated_eol(); | |
| 261 } | |
| 262 | |
| 263 @override | |
| 264 @failingTest | |
| 265 void test_string_simple_unterminated_interpolation_block() { | 223 void test_string_simple_unterminated_interpolation_block() { |
| 266 // See defaultRecoveryStrategy recoverString | 224 // See defaultRecoveryStrategy recoverString |
| 267 super.test_string_simple_unterminated_interpolation_block(); | 225 super.test_string_simple_unterminated_interpolation_block(); |
| 268 } | 226 } |
| 269 | 227 |
| 270 @override | 228 @override |
| 271 @failingTest | 229 @failingTest |
| 272 void test_string_simple_unterminated_interpolation_identifier() { | 230 void test_string_simple_unterminated_interpolation_identifier() { |
| 273 // See defaultRecoveryStrategy recoverString | 231 // See defaultRecoveryStrategy recoverString |
| 274 super.test_string_simple_unterminated_interpolation_identifier(); | 232 super.test_string_simple_unterminated_interpolation_identifier(); |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 365 } else if (token is fasta.UnmatchedToken) { | 323 } else if (token is fasta.UnmatchedToken) { |
| 366 expect(lastClosedGroup?.endGroup?.next, same(token), | 324 expect(lastClosedGroup?.endGroup?.next, same(token), |
| 367 reason: 'Unexpected error token for group: $lastClosedGroup'); | 325 reason: 'Unexpected error token for group: $lastClosedGroup'); |
| 368 expect(token.begin, lastClosedGroup); | 326 expect(token.begin, lastClosedGroup); |
| 369 } | 327 } |
| 370 token = token.next; | 328 token = token.next; |
| 371 } | 329 } |
| 372 expect(openerStack, isEmpty, reason: 'Missing closers'); | 330 expect(openerStack, isEmpty, reason: 'Missing closers'); |
| 373 } | 331 } |
| 374 } | 332 } |
| OLD | NEW |