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

Side by Side Diff: pkg/analyzer/test/generated/utilities_test.dart

Issue 2928773003: more fixes for fasta analyzer integration (Closed)
Patch Set: Created 3 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 library analyzer.test.generated.utilities_test; 5 library analyzer.test.generated.utilities_test;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 8
9 import 'package:analyzer/dart/ast/ast.dart'; 9 import 'package:analyzer/dart/ast/ast.dart';
10 import 'package:analyzer/dart/ast/standard_ast_factory.dart'; 10 import 'package:analyzer/dart/ast/standard_ast_factory.dart';
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 } 54 }
55 return super.isEqualNodes(first, second); 55 return super.isEqualNodes(first, second);
56 } 56 }
57 57
58 @override 58 @override
59 bool isEqualTokens(Token first, Token second) { 59 bool isEqualTokens(Token first, Token second) {
60 if (expectTokensCopied && first != null && identical(first, second)) { 60 if (expectTokensCopied && first != null && identical(first, second)) {
61 fail('Failed to copy token: ${first.lexeme} (${first.offset})'); 61 fail('Failed to copy token: ${first.lexeme} (${first.offset})');
62 return false; 62 return false;
63 } 63 }
64 if (first is TokenWithComment) { 64 if (first?.precedingComments != null) {
65 CommentToken comment = first.precedingComments; 65 CommentToken comment = first.precedingComments;
66 if (comment.parent != first) { 66 if (comment.parent != first) {
67 fail('Failed to link the comment "$comment" with the token "$first".'); 67 fail('Failed to link the comment "$comment" with the token "$first".');
68 } 68 }
69 } 69 }
70 return super.isEqualTokens(first, second); 70 return super.isEqualTokens(first, second);
71 } 71 }
72 } 72 }
73 73
74 @reflectiveTest 74 @reflectiveTest
(...skipping 4314 matching lines...) Expand 10 before | Expand all | Expand 10 after
4389 tokenMap.put(key, value); 4389 tokenMap.put(key, value);
4390 expect(tokenMap.get(key), same(value)); 4390 expect(tokenMap.get(key), same(value));
4391 } 4391 }
4392 } 4392 }
4393 4393
4394 class _ExceptionThrowingVisitor extends SimpleAstVisitor { 4394 class _ExceptionThrowingVisitor extends SimpleAstVisitor {
4395 visitNullLiteral(NullLiteral node) { 4395 visitNullLiteral(NullLiteral node) {
4396 throw new ArgumentError(''); 4396 throw new ArgumentError('');
4397 } 4397 }
4398 } 4398 }
OLDNEW
« no previous file with comments | « pkg/analyzer/test/generated/scanner_test.dart ('k') | pkg/front_end/lib/src/fasta/scanner/token.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698