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

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

Issue 492463004: New analyzer snapshot. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « pkg/analyzer/pubspec.yaml ('k') | pkg/analyzer/test/generated/element_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 2188 matching lines...) Expand 10 before | Expand all | Expand 10 after
2199 } 2199 }
2200 2200
2201 void test_visitForStatement_u() { 2201 void test_visitForStatement_u() {
2202 _assertSource("for (;; u) {}", AstFactory.forStatement(null, null, AstFactor y.list([AstFactory.identifier3("u")]), AstFactory.block([]))); 2202 _assertSource("for (;; u) {}", AstFactory.forStatement(null, null, AstFactor y.list([AstFactory.identifier3("u")]), AstFactory.block([])));
2203 } 2203 }
2204 2204
2205 void test_visitFunctionDeclaration_getter() { 2205 void test_visitFunctionDeclaration_getter() {
2206 _assertSource("get f() {}", AstFactory.functionDeclaration(null, Keyword.GET , "f", AstFactory.functionExpression())); 2206 _assertSource("get f() {}", AstFactory.functionDeclaration(null, Keyword.GET , "f", AstFactory.functionExpression()));
2207 } 2207 }
2208 2208
2209 void test_visitFunctionDeclaration_local_blockBody() {
2210 FunctionDeclaration f = AstFactory.functionDeclaration(null, null, "f", AstF actory.functionExpression());
2211 FunctionDeclarationStatement fStatement = new FunctionDeclarationStatement(f );
2212 _assertSource("main() {f() {} 42;}", AstFactory.functionDeclaration(null, nu ll, "main", AstFactory.functionExpression2(AstFactory.formalParameterList([]), A stFactory.blockFunctionBody2([
2213 fStatement,
2214 AstFactory.expressionStatement(AstFactory.integer(42))]))));
2215 }
2216
2217 void test_visitFunctionDeclaration_local_expressionBody() {
2218 FunctionDeclaration f = AstFactory.functionDeclaration(null, null, "f", AstF actory.functionExpression2(AstFactory.formalParameterList([]), AstFactory.expres sionFunctionBody(AstFactory.integer(1))));
2219 FunctionDeclarationStatement fStatement = new FunctionDeclarationStatement(f );
2220 _assertSource("main() {f() => 1; 2;}", AstFactory.functionDeclaration(null, null, "main", AstFactory.functionExpression2(AstFactory.formalParameterList([]), AstFactory.blockFunctionBody2([
2221 fStatement,
2222 AstFactory.expressionStatement(AstFactory.integer(2))]))));
2223 }
2224
2209 void test_visitFunctionDeclaration_normal() { 2225 void test_visitFunctionDeclaration_normal() {
2210 _assertSource("f() {}", AstFactory.functionDeclaration(null, null, "f", AstF actory.functionExpression())); 2226 _assertSource("f() {}", AstFactory.functionDeclaration(null, null, "f", AstF actory.functionExpression()));
2211 } 2227 }
2212 2228
2213 void test_visitFunctionDeclaration_setter() { 2229 void test_visitFunctionDeclaration_setter() {
2214 _assertSource("set f() {}", AstFactory.functionDeclaration(null, Keyword.SET , "f", AstFactory.functionExpression())); 2230 _assertSource("set f() {}", AstFactory.functionDeclaration(null, Keyword.SET , "f", AstFactory.functionExpression()));
2215 } 2231 }
2216 2232
2217 void test_visitFunctionDeclaration_withMetadata() { 2233 void test_visitFunctionDeclaration_withMetadata() {
2218 FunctionDeclaration declaration = AstFactory.functionDeclaration(null, null, "f", AstFactory.functionExpression()); 2234 FunctionDeclaration declaration = AstFactory.functionDeclaration(null, null, "f", AstFactory.functionExpression());
2219 declaration.metadata = AstFactory.list([AstFactory.annotation(AstFactory.ide ntifier3("deprecated"))]); 2235 declaration.metadata = AstFactory.list([AstFactory.annotation(AstFactory.ide ntifier3("deprecated"))]);
2220 _assertSource("@deprecated f() {}", declaration); 2236 _assertSource("@deprecated f() {}", declaration);
2221 } 2237 }
2222 2238
2223 void test_visitFunctionDeclarationStatement() { 2239 void test_visitFunctionDeclarationStatement() {
2224 _assertSource("f() {};", AstFactory.functionDeclarationStatement(null, null, "f", AstFactory.functionExpression())); 2240 _assertSource("f() {}", AstFactory.functionDeclarationStatement(null, null, "f", AstFactory.functionExpression()));
2225 } 2241 }
2226 2242
2227 void test_visitFunctionExpression() { 2243 void test_visitFunctionExpression() {
2228 _assertSource("() {}", AstFactory.functionExpression()); 2244 _assertSource("() {}", AstFactory.functionExpression());
2229 } 2245 }
2230 2246
2231 void test_visitFunctionExpressionInvocation() { 2247 void test_visitFunctionExpressionInvocation() {
2232 _assertSource("f()", AstFactory.functionExpressionInvocation(AstFactory.iden tifier3("f"), [])); 2248 _assertSource("f()", AstFactory.functionExpressionInvocation(AstFactory.iden tifier3("f"), []));
2233 } 2249 }
2234 2250
(...skipping 1144 matching lines...) Expand 10 before | Expand all | Expand 10 after
3379 runJUnitTest(__test, __test.test_visitFormalParameterList_rrpp); 3395 runJUnitTest(__test, __test.test_visitFormalParameterList_rrpp);
3380 }); 3396 });
3381 _ut.test('test_visitFunctionDeclarationStatement', () { 3397 _ut.test('test_visitFunctionDeclarationStatement', () {
3382 final __test = new ToSourceVisitorTest(); 3398 final __test = new ToSourceVisitorTest();
3383 runJUnitTest(__test, __test.test_visitFunctionDeclarationStatement); 3399 runJUnitTest(__test, __test.test_visitFunctionDeclarationStatement);
3384 }); 3400 });
3385 _ut.test('test_visitFunctionDeclaration_getter', () { 3401 _ut.test('test_visitFunctionDeclaration_getter', () {
3386 final __test = new ToSourceVisitorTest(); 3402 final __test = new ToSourceVisitorTest();
3387 runJUnitTest(__test, __test.test_visitFunctionDeclaration_getter); 3403 runJUnitTest(__test, __test.test_visitFunctionDeclaration_getter);
3388 }); 3404 });
3405 _ut.test('test_visitFunctionDeclaration_local_blockBody', () {
3406 final __test = new ToSourceVisitorTest();
3407 runJUnitTest(__test, __test.test_visitFunctionDeclaration_local_blockBod y);
3408 });
3409 _ut.test('test_visitFunctionDeclaration_local_expressionBody', () {
3410 final __test = new ToSourceVisitorTest();
3411 runJUnitTest(__test, __test.test_visitFunctionDeclaration_local_expressi onBody);
3412 });
3389 _ut.test('test_visitFunctionDeclaration_normal', () { 3413 _ut.test('test_visitFunctionDeclaration_normal', () {
3390 final __test = new ToSourceVisitorTest(); 3414 final __test = new ToSourceVisitorTest();
3391 runJUnitTest(__test, __test.test_visitFunctionDeclaration_normal); 3415 runJUnitTest(__test, __test.test_visitFunctionDeclaration_normal);
3392 }); 3416 });
3393 _ut.test('test_visitFunctionDeclaration_setter', () { 3417 _ut.test('test_visitFunctionDeclaration_setter', () {
3394 final __test = new ToSourceVisitorTest(); 3418 final __test = new ToSourceVisitorTest();
3395 runJUnitTest(__test, __test.test_visitFunctionDeclaration_setter); 3419 runJUnitTest(__test, __test.test_visitFunctionDeclaration_setter);
3396 }); 3420 });
3397 _ut.test('test_visitFunctionDeclaration_withMetadata', () { 3421 _ut.test('test_visitFunctionDeclaration_withMetadata', () {
3398 final __test = new ToSourceVisitorTest(); 3422 final __test = new ToSourceVisitorTest();
(...skipping 610 matching lines...) Expand 10 before | Expand all | Expand 10 after
4009 ToSourceVisitorTest.dartSuite(); 4033 ToSourceVisitorTest.dartSuite();
4010 BreadthFirstVisitorTest.dartSuite(); 4034 BreadthFirstVisitorTest.dartSuite();
4011 ClassDeclarationTest.dartSuite(); 4035 ClassDeclarationTest.dartSuite();
4012 ClassTypeAliasTest.dartSuite(); 4036 ClassTypeAliasTest.dartSuite();
4013 IndexExpressionTest.dartSuite(); 4037 IndexExpressionTest.dartSuite();
4014 NodeListTest.dartSuite(); 4038 NodeListTest.dartSuite();
4015 SimpleIdentifierTest.dartSuite(); 4039 SimpleIdentifierTest.dartSuite();
4016 SimpleStringLiteralTest.dartSuite(); 4040 SimpleStringLiteralTest.dartSuite();
4017 VariableDeclarationTest.dartSuite(); 4041 VariableDeclarationTest.dartSuite();
4018 } 4042 }
OLDNEW
« no previous file with comments | « pkg/analyzer/pubspec.yaml ('k') | pkg/analyzer/test/generated/element_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698