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

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

Issue 679923002: Port enums AST changes to Dart. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 1 month 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 | Annotate | Revision Log
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 // This code was auto-generated, is not intended to be edited, and is subject to 5 // This code was auto-generated, is not intended to be edited, and is subject to
6 // significant change. Please see the README file for more information. 6 // significant change. Please see the README file for more information.
7 7
8 library engine.ast_test; 8 library engine.ast_test;
9 9
10 import 'package:analyzer/src/generated/java_core.dart'; 10 import 'package:analyzer/src/generated/java_core.dart';
(...skipping 843 matching lines...) Expand 10 before | Expand all | Expand 10 after
854 SimpleIdentifier identifier = AstFactory.constructorDeclaration(AstFactory.i dentifier3("C"), "c", null, null).name; 854 SimpleIdentifier identifier = AstFactory.constructorDeclaration(AstFactory.i dentifier3("C"), "c", null, null).name;
855 JUnitTestCase.assertTrue(identifier.inDeclarationContext()); 855 JUnitTestCase.assertTrue(identifier.inDeclarationContext());
856 } 856 }
857 857
858 void test_inDeclarationContext_declaredIdentifier() { 858 void test_inDeclarationContext_declaredIdentifier() {
859 DeclaredIdentifier declaredIdentifier = AstFactory.declaredIdentifier3("v"); 859 DeclaredIdentifier declaredIdentifier = AstFactory.declaredIdentifier3("v");
860 SimpleIdentifier identifier = declaredIdentifier.identifier; 860 SimpleIdentifier identifier = declaredIdentifier.identifier;
861 JUnitTestCase.assertTrue(identifier.inDeclarationContext()); 861 JUnitTestCase.assertTrue(identifier.inDeclarationContext());
862 } 862 }
863 863
864 void test_inDeclarationContext_enumConstantDeclaration() {
865 EnumDeclaration enumDeclaration = AstFactory.enumDeclaration2('MyEnum', ['CO NST']);
866 SimpleIdentifier identifier = enumDeclaration.constants[0].name;
867 JUnitTestCase.assertTrue(identifier.inDeclarationContext());
868 }
869
870 void test_inDeclarationContext_enumDeclaration() {
871 EnumDeclaration enumDeclaration = AstFactory.enumDeclaration2('MyEnum', ['A' , 'B', 'C']);
872 SimpleIdentifier identifier = enumDeclaration.name;
873 JUnitTestCase.assertTrue(identifier.inDeclarationContext());
874 }
875
864 void test_inDeclarationContext_fieldFormalParameter() { 876 void test_inDeclarationContext_fieldFormalParameter() {
865 SimpleIdentifier identifier = AstFactory.fieldFormalParameter2("p").identifi er; 877 SimpleIdentifier identifier = AstFactory.fieldFormalParameter2("p").identifi er;
866 JUnitTestCase.assertFalse(identifier.inDeclarationContext()); 878 JUnitTestCase.assertFalse(identifier.inDeclarationContext());
867 } 879 }
868 880
869 void test_inDeclarationContext_functionDeclaration() { 881 void test_inDeclarationContext_functionDeclaration() {
870 SimpleIdentifier identifier = AstFactory.functionDeclaration(null, null, "f" , null).name; 882 SimpleIdentifier identifier = AstFactory.functionDeclaration(null, null, "f" , null).name;
871 JUnitTestCase.assertTrue(identifier.inDeclarationContext()); 883 JUnitTestCase.assertTrue(identifier.inDeclarationContext());
872 } 884 }
873 885
(...skipping 1721 matching lines...) Expand 10 before | Expand all | Expand 10 after
2595 runReflectiveTests(BreadthFirstVisitorTest); 2607 runReflectiveTests(BreadthFirstVisitorTest);
2596 runReflectiveTests(ClassDeclarationTest); 2608 runReflectiveTests(ClassDeclarationTest);
2597 runReflectiveTests(ClassTypeAliasTest); 2609 runReflectiveTests(ClassTypeAliasTest);
2598 runReflectiveTests(IndexExpressionTest); 2610 runReflectiveTests(IndexExpressionTest);
2599 runReflectiveTests(NodeListTest); 2611 runReflectiveTests(NodeListTest);
2600 runReflectiveTests(SimpleIdentifierTest); 2612 runReflectiveTests(SimpleIdentifierTest);
2601 runReflectiveTests(SimpleStringLiteralTest); 2613 runReflectiveTests(SimpleStringLiteralTest);
2602 runReflectiveTests(StringInterpolationTest); 2614 runReflectiveTests(StringInterpolationTest);
2603 runReflectiveTests(VariableDeclarationTest); 2615 runReflectiveTests(VariableDeclarationTest);
2604 } 2616 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698