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

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

Issue 768233002: Extract DocumentationCommentToken with field. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years 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/parser_test.dart
diff --git a/pkg/analyzer/test/generated/parser_test.dart b/pkg/analyzer/test/generated/parser_test.dart
index 2e568906f0a63cc116a5da48f7ae55bf78fbf32d..afc5405422bb27fd197a7505847b6ba8976c06f4 100644
--- a/pkg/analyzer/test/generated/parser_test.dart
+++ b/pkg/analyzer/test/generated/parser_test.dart
@@ -6742,11 +6742,11 @@ void''');
}
void test_parseCommentReferences_multiLine() {
- CommentToken token = new CommentToken(
+ DocumentationCommentToken token = new DocumentationCommentToken(
TokenType.MULTI_LINE_COMMENT,
"/** xxx [a] yyy [bb] zzz */",
3);
- List<CommentToken> tokens = <CommentToken>[token];
+ List<DocumentationCommentToken> tokens = <DocumentationCommentToken>[token];
List<CommentReference> references =
ParserTestCase.parse("parseCommentReferences", <Object>[tokens], "");
List<Token> tokenReferences = token.references;
@@ -6775,8 +6775,11 @@ void''');
}
void test_parseCommentReferences_notClosed_noIdentifier() {
- List<CommentToken> tokens = <CommentToken>[
- new CommentToken(TokenType.MULTI_LINE_COMMENT, "/** [ some text", 5)];
+ List<DocumentationCommentToken> tokens = <DocumentationCommentToken>[
+ new DocumentationCommentToken(
+ TokenType.MULTI_LINE_COMMENT,
+ "/** [ some text",
+ 5)];
List<CommentReference> references =
ParserTestCase.parse("parseCommentReferences", <Object>[tokens], "");
expect(references, hasLength(1));
@@ -6788,8 +6791,11 @@ void''');
}
void test_parseCommentReferences_notClosed_withIdentifier() {
- List<CommentToken> tokens = <CommentToken>[
- new CommentToken(TokenType.MULTI_LINE_COMMENT, "/** [namePrefix some text", 5)];
+ List<DocumentationCommentToken> tokens = <DocumentationCommentToken>[
+ new DocumentationCommentToken(
+ TokenType.MULTI_LINE_COMMENT,
+ "/** [namePrefix some text",
+ 5)];
List<CommentReference> references =
ParserTestCase.parse("parseCommentReferences", <Object>[tokens], "");
expect(references, hasLength(1));
@@ -6801,9 +6807,12 @@ void''');
}
void test_parseCommentReferences_singleLine() {
- List<CommentToken> tokens = <CommentToken>[
- new CommentToken(TokenType.SINGLE_LINE_COMMENT, "/// xxx [a] yyy [b] zzz", 3),
- new CommentToken(TokenType.SINGLE_LINE_COMMENT, "/// x [c]", 28)];
+ List<DocumentationCommentToken> tokens = <DocumentationCommentToken>[
+ new DocumentationCommentToken(
+ TokenType.SINGLE_LINE_COMMENT,
+ "/// xxx [a] yyy [b] zzz",
+ 3),
+ new DocumentationCommentToken(TokenType.SINGLE_LINE_COMMENT, "/// x [c]", 28)];
List<CommentReference> references =
ParserTestCase.parse("parseCommentReferences", <Object>[tokens], "");
expect(references, hasLength(3));
@@ -6822,8 +6831,8 @@ void''');
}
void test_parseCommentReferences_skipCodeBlock_bracketed() {
- List<CommentToken> tokens = <CommentToken>[
- new CommentToken(
+ List<DocumentationCommentToken> tokens = <DocumentationCommentToken>[
+ new DocumentationCommentToken(
TokenType.MULTI_LINE_COMMENT,
"/** [:xxx [a] yyy:] [b] zzz */",
3)];
@@ -6837,8 +6846,8 @@ void''');
}
void test_parseCommentReferences_skipCodeBlock_spaces() {
- List<CommentToken> tokens = <CommentToken>[
- new CommentToken(
+ List<DocumentationCommentToken> tokens = <DocumentationCommentToken>[
+ new DocumentationCommentToken(
TokenType.MULTI_LINE_COMMENT,
"/**\n * a[i]\n * xxx [i] zzz\n */",
3)];
@@ -6852,8 +6861,8 @@ void''');
}
void test_parseCommentReferences_skipLinkDefinition() {
- List<CommentToken> tokens = <CommentToken>[
- new CommentToken(
+ List<DocumentationCommentToken> tokens = <DocumentationCommentToken>[
+ new DocumentationCommentToken(
TokenType.MULTI_LINE_COMMENT,
"/** [a]: http://www.google.com (Google) [b] zzz */",
3)];
@@ -6867,8 +6876,8 @@ void''');
}
void test_parseCommentReferences_skipLinked() {
- List<CommentToken> tokens = <CommentToken>[
- new CommentToken(
+ List<DocumentationCommentToken> tokens = <DocumentationCommentToken>[
+ new DocumentationCommentToken(
TokenType.MULTI_LINE_COMMENT,
"/** [a](http://www.google.com) [b] zzz */",
3)];
@@ -6882,8 +6891,11 @@ void''');
}
void test_parseCommentReferences_skipReferenceLink() {
- List<CommentToken> tokens = <CommentToken>[
- new CommentToken(TokenType.MULTI_LINE_COMMENT, "/** [a][c] [b] zzz */", 3)];
+ List<DocumentationCommentToken> tokens = <DocumentationCommentToken>[
+ new DocumentationCommentToken(
+ TokenType.MULTI_LINE_COMMENT,
+ "/** [a][c] [b] zzz */",
+ 3)];
List<CommentReference> references =
ParserTestCase.parse("parseCommentReferences", <Object>[tokens], "");
expect(references, hasLength(1));
« pkg/analyzer/lib/src/generated/parser.dart ('K') | « pkg/analyzer/lib/src/generated/scanner.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698