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

Unified Diff: pkg/analyzer_experimental/test/generated/ast_test.dart

Issue 15675016: More fixes for java2dart and status files. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
Index: pkg/analyzer_experimental/test/generated/ast_test.dart
diff --git a/pkg/analyzer_experimental/test/generated/ast_test.dart b/pkg/analyzer_experimental/test/generated/ast_test.dart
index 10c79284291e30f146deeed1f872f59b33e5d7df..a458f11dab67675b9e4f53e42198d20c2852fba2 100644
--- a/pkg/analyzer_experimental/test/generated/ast_test.dart
+++ b/pkg/analyzer_experimental/test/generated/ast_test.dart
@@ -182,6 +182,35 @@ class IndexExpressionTest extends EngineTestCase {
});
}
}
+class VariableDeclarationTest extends ParserTestCase {
+ void test_getDocumentationComment_onGrandParent() {
+ VariableDeclaration varDecl = ASTFactory.variableDeclaration("a");
+ TopLevelVariableDeclaration decl = ASTFactory.topLevelVariableDeclaration2(Keyword.VAR, [varDecl]);
+ Comment comment = Comment.createDocumentationComment(new List<Token>(0));
+ JUnitTestCase.assertNull(varDecl.documentationComment);
+ decl.documentationComment = comment;
+ JUnitTestCase.assertNotNull(varDecl.documentationComment);
+ JUnitTestCase.assertNotNull(decl.documentationComment);
+ }
+ void test_getDocumentationComment_onNode() {
+ VariableDeclaration decl = ASTFactory.variableDeclaration("a");
+ Comment comment = Comment.createDocumentationComment(new List<Token>(0));
+ decl.documentationComment = comment;
+ JUnitTestCase.assertNotNull(decl.documentationComment);
+ }
+ static dartSuite() {
+ _ut.group('VariableDeclarationTest', () {
+ _ut.test('test_getDocumentationComment_onGrandParent', () {
+ final __test = new VariableDeclarationTest();
+ runJUnitTest(__test, __test.test_getDocumentationComment_onGrandParent);
+ });
+ _ut.test('test_getDocumentationComment_onNode', () {
+ final __test = new VariableDeclarationTest();
+ runJUnitTest(__test, __test.test_getDocumentationComment_onNode);
+ });
+ });
+ }
+}
/**
* The class {@code ASTFactory} defines utility methods that can be used to create AST nodes. The
* nodes that are created are complete in the sense that all of the tokens that would have been
@@ -679,6 +708,7 @@ class AssignmentKind implements Comparable<AssignmentKind> {
AssignmentKind(this.name, this.ordinal) {
}
int compareTo(AssignmentKind other) => ordinal - other.ordinal;
+ int get hashCode => ordinal;
String toString() => name;
}
class WrapperKind implements Comparable<WrapperKind> {
@@ -697,6 +727,7 @@ class WrapperKind implements Comparable<WrapperKind> {
WrapperKind(this.name, this.ordinal) {
}
int compareTo(WrapperKind other) => ordinal - other.ordinal;
+ int get hashCode => ordinal;
String toString() => name;
}
class BreadthFirstVisitorTest extends ParserTestCase {
@@ -2910,4 +2941,5 @@ main() {
BreadthFirstVisitorTest.dartSuite();
IndexExpressionTest.dartSuite();
SimpleIdentifierTest.dartSuite();
+ VariableDeclarationTest.dartSuite();
}

Powered by Google App Engine
This is Rietveld 408576698